mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 20:45:29 +03:00
adapt models to changed federation invitations API
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
fac8d6daa8
commit
8bd5a32f2d
3 changed files with 30 additions and 29 deletions
|
@ -21,15 +21,15 @@
|
|||
package com.nextcloud.talk.invitation.data
|
||||
|
||||
data class Invitation(
|
||||
var id: Int,
|
||||
var userId: String,
|
||||
var state: Int,
|
||||
var localRoomId: Int,
|
||||
var accessToken: String?,
|
||||
var remoteServerUrl: String,
|
||||
var remoteToken: String,
|
||||
var remoteAttendeeId: Int,
|
||||
var inviterCloudId: String,
|
||||
var inviterDisplayName: String,
|
||||
var roomName: String
|
||||
var id: Int = 0,
|
||||
var state: Int = 0,
|
||||
var localCloudId: String? = null,
|
||||
var localToken: String? = null,
|
||||
var remoteAttendeeId: Int = 0,
|
||||
var remoteServerUrl: String? = null,
|
||||
var remoteToken: String? = null,
|
||||
var roomName: String? = null,
|
||||
var userId: String? = null,
|
||||
var inviterCloudId: String? = null,
|
||||
var inviterDisplayName: String? = null
|
||||
)
|
||||
|
|
|
@ -66,16 +66,16 @@ class InvitationsRepositoryImpl(private val ncApi: NcApi) :
|
|||
filteredInvitations.map { invitation ->
|
||||
Invitation(
|
||||
invitation.id,
|
||||
invitation.userId!!,
|
||||
invitation.state,
|
||||
invitation.localRoomId,
|
||||
invitation.accessToken!!,
|
||||
invitation.localCloudId!!,
|
||||
invitation.localToken!!,
|
||||
invitation.remoteAttendeeId,
|
||||
invitation.remoteServerUrl!!,
|
||||
invitation.remoteToken!!,
|
||||
invitation.remoteAttendeeId,
|
||||
invitation.roomName!!,
|
||||
invitation.userId!!,
|
||||
invitation.inviterCloudId!!,
|
||||
invitation.inviterDisplayName!!,
|
||||
invitation.roomName!!
|
||||
invitation.inviterDisplayName!!
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
@ -29,27 +29,28 @@ import kotlinx.parcelize.Parcelize
|
|||
data class Invitation(
|
||||
@JsonField(name = ["id"])
|
||||
var id: Int = 0,
|
||||
@JsonField(name = ["userId"])
|
||||
var userId: String? = null,
|
||||
@JsonField(name = ["state"])
|
||||
var state: Int = 0,
|
||||
@JsonField(name = ["localRoomId"])
|
||||
var localRoomId: Int = 0,
|
||||
@JsonField(name = ["accessToken"])
|
||||
var accessToken: String? = null,
|
||||
@JsonField(name = ["localCloudId"])
|
||||
var localCloudId: String? = null,
|
||||
@JsonField(name = ["localToken"])
|
||||
var localToken: String? = null,
|
||||
@JsonField(name = ["remoteAttendeeId"])
|
||||
var remoteAttendeeId: Int = 0,
|
||||
@JsonField(name = ["remoteServerUrl"])
|
||||
var remoteServerUrl: String? = null,
|
||||
@JsonField(name = ["remoteToken"])
|
||||
var remoteToken: String? = null,
|
||||
@JsonField(name = ["remoteAttendeeId"])
|
||||
var remoteAttendeeId: Int = 0,
|
||||
@JsonField(name = ["roomName"])
|
||||
var roomName: String? = null,
|
||||
@JsonField(name = ["userId"])
|
||||
var userId: String? = null,
|
||||
@JsonField(name = ["inviterCloudId"])
|
||||
var inviterCloudId: String? = null,
|
||||
@JsonField(name = ["inviterDisplayName"])
|
||||
var inviterDisplayName: String? = null,
|
||||
@JsonField(name = ["roomName"])
|
||||
var roomName: String? = null
|
||||
var inviterDisplayName: String? = null
|
||||
|
||||
) : Parcelable {
|
||||
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||
constructor() : this(0, null, 0, 0, null, null, null, 0, null, null, null)
|
||||
constructor() : this(0, 0, null, null, 0, null, null, null, null, null, null)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue