add endpoints and hasImportant variable

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2025-05-20 16:54:59 +02:00 committed by backportbot[bot]
parent d1da943ed8
commit 8eb0b675e3
5 changed files with 28 additions and 7 deletions

View File

@ -179,6 +179,19 @@ interface NcApiCoroutines {
@Url url: String
): GenericOverall
@POST
suspend fun markConversationAsImportant(
@Header("Authorization") authorization: String,
@Url url: String
): GenericOverall
@DELETE
suspend fun markConversationAsUnimportant(
@Header("Authorization") authorization: String,
@Url url: String
): GenericOverall
@DELETE
suspend fun removeConversationFromFavorites(
@Header("Authorization") authorization: String,

View File

@ -62,7 +62,8 @@ fun ConversationModel.asEntity() =
remoteServer = remoteServer,
remoteToken = remoteToken,
hasArchived = hasArchived,
hasSensitive = hasSensitive
hasSensitive = hasSensitive,
hasImportant = hasImportant
)
fun ConversationEntity.asModel() =
@ -115,7 +116,8 @@ fun ConversationEntity.asModel() =
remoteServer = remoteServer,
remoteToken = remoteToken,
hasArchived = hasArchived,
hasSensitive = hasSensitive
hasSensitive = hasSensitive,
hasImportant = hasImportant
)
fun Conversation.asEntity(accountId: Long) =
@ -167,5 +169,6 @@ fun Conversation.asEntity(accountId: Long) =
remoteServer = remoteServer,
remoteToken = remoteToken,
hasArchived = hasArchived,
hasSensitive = hasSensitive
hasSensitive = hasSensitive,
hasImportant = hasImportant
)

View File

@ -95,7 +95,8 @@ data class ConversationEntity(
@ColumnInfo(name = "unreadMentionDirect") var unreadMentionDirect: Boolean,
@ColumnInfo(name = "unreadMessages") var unreadMessages: Int = 0,
@ColumnInfo(name = "hasArchived") var hasArchived: Boolean = false,
@ColumnInfo(name = "hasSensitive") var hasSensitive: Boolean = false
@ColumnInfo(name = "hasSensitive") var hasSensitive: Boolean = false,
@ColumnInfo(name = "hasImportant") var hasImportant: Boolean = false
// missing/not needed: attendeeId
// missing/not needed: attendeePin
// missing/not needed: attendeePermissions

View File

@ -62,10 +62,10 @@ class ConversationModel(
var remoteToken: String? = null,
var hasArchived: Boolean = false,
var hasSensitive: Boolean = false,
var hasImportant:Boolean = false,
// attributes that don't come from API. This should be changed?!
var password: String? = null
) {
companion object {
@ -128,7 +128,8 @@ class ConversationModel(
remoteServer = conversation.remoteServer,
remoteToken = conversation.remoteToken,
hasArchived = conversation.hasArchived,
hasSensitive = conversation.hasSensitive
hasSensitive = conversation.hasSensitive,
hasImportant = conversation.hasImportant
)
}
}

View File

@ -168,5 +168,8 @@ data class Conversation(
var hasArchived: Boolean = false,
@JsonField(name = ["isSensitive"])
var hasSensitive: Boolean = false
var hasSensitive: Boolean = false,
@JsonField(name = ["isImportant"])
var hasImportant: Boolean = false
) : Parcelable