add endpoints and add isSensitive parameter

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2025-05-20 11:13:08 +02:00 committed by Marcel Hibbe
parent 07dc25d3bf
commit c337d5087b
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
5 changed files with 29 additions and 7 deletions

View File

@ -185,6 +185,18 @@ interface NcApiCoroutines {
@Url url: String @Url url: String
): GenericOverall ): GenericOverall
@POST
suspend fun markConversationAsSensitive(
@Header("Authorization") authorization:String,
@Url url:String
): GenericOverall
@DELETE
suspend fun markConversationAsInsensitive(
@Header("Authorization") authorization:String,
@Url url:String
): GenericOverall
@FormUrlEncoded @FormUrlEncoded
@POST @POST
suspend fun notificationCalls( suspend fun notificationCalls(

View File

@ -61,7 +61,8 @@ fun ConversationModel.asEntity() =
recordingConsentRequired = recordingConsentRequired, recordingConsentRequired = recordingConsentRequired,
remoteServer = remoteServer, remoteServer = remoteServer,
remoteToken = remoteToken, remoteToken = remoteToken,
hasArchived = hasArchived hasArchived = hasArchived,
isSensitive = isSensitive
) )
fun ConversationEntity.asModel() = fun ConversationEntity.asModel() =
@ -113,7 +114,8 @@ fun ConversationEntity.asModel() =
recordingConsentRequired = recordingConsentRequired, recordingConsentRequired = recordingConsentRequired,
remoteServer = remoteServer, remoteServer = remoteServer,
remoteToken = remoteToken, remoteToken = remoteToken,
hasArchived = hasArchived hasArchived = hasArchived,
isSensitive = isSensitive
) )
fun Conversation.asEntity(accountId: Long) = fun Conversation.asEntity(accountId: Long) =
@ -164,5 +166,6 @@ fun Conversation.asEntity(accountId: Long) =
recordingConsentRequired = recordingConsentRequired, recordingConsentRequired = recordingConsentRequired,
remoteServer = remoteServer, remoteServer = remoteServer,
remoteToken = remoteToken, remoteToken = remoteToken,
hasArchived = hasArchived hasArchived = hasArchived,
isSensitive = isSensitive
) )

View File

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

View File

@ -61,9 +61,11 @@ class ConversationModel(
var remoteServer: String? = null, var remoteServer: String? = null,
var remoteToken: String? = null, var remoteToken: String? = null,
var hasArchived: Boolean = false, var hasArchived: Boolean = false,
var isSensitive: Boolean = false,
// attributes that don't come from API. This should be changed?! // attributes that don't come from API. This should be changed?!
var password: String? = null var password: String? = null,
) { ) {
companion object { companion object {
@ -125,7 +127,8 @@ class ConversationModel(
recordingConsentRequired = conversation.recordingConsentRequired, recordingConsentRequired = conversation.recordingConsentRequired,
remoteServer = conversation.remoteServer, remoteServer = conversation.remoteServer,
remoteToken = conversation.remoteToken, remoteToken = conversation.remoteToken,
hasArchived = conversation.hasArchived hasArchived = conversation.hasArchived,
isSensitive = conversation.isSensitive
) )
} }
} }

View File

@ -165,5 +165,8 @@ data class Conversation(
var remoteToken: String? = "", var remoteToken: String? = "",
@JsonField(name = ["isArchived"]) @JsonField(name = ["isArchived"])
var hasArchived: Boolean = false var hasArchived: Boolean = false,
@JsonField(name = ["isSensitive"])
var isSensitive: Boolean = false
) : Parcelable ) : Parcelable