mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Get call status from server
This commit is contained in:
@ -208,14 +208,19 @@ class ConversationsHelper {
|
||||
/// Turn an API entry into a [Conversation] object
|
||||
Conversation _apiToConversation(Map<String, dynamic> map) {
|
||||
return Conversation(
|
||||
id: map["ID"],
|
||||
ownerID: map["ID_owner"],
|
||||
lastActive: map["last_active"],
|
||||
name: map["name"] == false ? null : map["name"],
|
||||
following: map["following"] == 1,
|
||||
sawLastMessage: map["saw_last_message"] == 1,
|
||||
members: List<int>.from(map["members"]),
|
||||
);
|
||||
id: map["ID"],
|
||||
ownerID: map["ID_owner"],
|
||||
lastActive: map["last_active"],
|
||||
name: map["name"] == false ? null : map["name"],
|
||||
following: map["following"] == 1,
|
||||
sawLastMessage: map["saw_last_message"] == 1,
|
||||
members: List<int>.from(map["members"]),
|
||||
callCapabilities: map["can_have_video_call"]
|
||||
? CallCapabilities.VIDEO
|
||||
: (map["can_have_call"]
|
||||
? CallCapabilities.AUDIO
|
||||
: CallCapabilities.NONE),
|
||||
isHavingCall: map["has_call_now"]);
|
||||
}
|
||||
|
||||
/// Parse a list of messages given by the server
|
||||
|
Reference in New Issue
Block a user