2017-03-10 03:55:07 +01:00
|
|
|
/* Copyright 2017 Andrew Dawson
|
|
|
|
*
|
2017-04-10 02:12:31 +02:00
|
|
|
* This file is a part of Tusky.
|
2017-03-10 03:55:07 +01:00
|
|
|
*
|
2017-04-10 02:12:31 +02:00
|
|
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
|
|
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
2017-03-10 03:55:07 +01:00
|
|
|
*
|
|
|
|
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
2017-04-10 02:12:31 +02:00
|
|
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
|
|
* Public License for more details.
|
2017-03-10 03:55:07 +01:00
|
|
|
*
|
2017-04-10 02:12:31 +02:00
|
|
|
* You should have received a copy of the GNU General Public License along with Tusky; if not,
|
|
|
|
* see <http://www.gnu.org/licenses>. */
|
2017-03-10 03:55:07 +01:00
|
|
|
|
2018-03-03 13:24:03 +01:00
|
|
|
package com.keylesspalace.tusky.entity
|
2017-03-10 03:55:07 +01:00
|
|
|
|
2022-01-21 07:34:26 +01:00
|
|
|
import com.google.gson.annotations.JsonAdapter
|
2018-03-03 13:24:03 +01:00
|
|
|
import com.google.gson.annotations.SerializedName
|
2022-01-21 07:34:26 +01:00
|
|
|
import com.keylesspalace.tusky.json.GuardedBooleanAdapter
|
2017-03-10 03:55:07 +01:00
|
|
|
|
2021-06-28 21:13:24 +02:00
|
|
|
data class Relationship(
|
2018-03-03 13:24:03 +01:00
|
|
|
val id: String,
|
|
|
|
val following: Boolean,
|
|
|
|
@SerializedName("followed_by") val followedBy: Boolean,
|
|
|
|
val blocking: Boolean,
|
|
|
|
val muting: Boolean,
|
2020-07-27 10:28:59 +02:00
|
|
|
@SerializedName("muting_notifications") val mutingNotifications: Boolean,
|
2018-06-18 13:26:18 +02:00
|
|
|
val requested: Boolean,
|
2020-06-23 19:59:49 +02:00
|
|
|
@SerializedName("showing_reblogs") val showingReblogs: Boolean,
|
2022-01-21 07:34:26 +01:00
|
|
|
/* Pleroma extension, same as 'notifying' on Mastodon.
|
|
|
|
* Some instances like qoto.org have a custom subscription feature where 'subscribing' is a json object,
|
|
|
|
* so we use the custom GuardedBooleanAdapter to ignore the field if it is not a boolean.
|
|
|
|
*/
|
|
|
|
@JsonAdapter(GuardedBooleanAdapter::class) val subscribing: Boolean? = null,
|
2020-11-17 20:10:54 +01:00
|
|
|
@SerializedName("domain_blocking") val blockingDomain: Boolean,
|
2020-12-23 12:52:39 +01:00
|
|
|
val note: String?, // nullable for backward compatibility / feature detection
|
|
|
|
val notifying: Boolean? // since 3.3.0rc
|
2018-03-03 13:24:03 +01:00
|
|
|
)
|