aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/call_store.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-12-20 00:15:05 +0100
committerfiaxh <git@lightrise.org>2021-12-23 00:19:26 +0100
commitf0c7dd0682fec8d72c644d8e54896de7bdc40ddb (patch)
tree0e275aa1fab7004cef7c92e16721d493b18bf8b6 /libdino/src/service/call_store.vala
parentff4e2540ae3bfab6873beb7e03ef5c6a5b9da1da (diff)
downloaddino-f0c7dd0682fec8d72c644d8e54896de7bdc40ddb.tar.gz
dino-f0c7dd0682fec8d72c644d8e54896de7bdc40ddb.zip
UI + libdino: Improve MUJI calls from MUC
- Move calls from ICE-thead onto main thread - Identify Call.ourpart as MUC nick if in MUC - Keep track of the initiator of a call
Diffstat (limited to 'libdino/src/service/call_store.vala')
-rw-r--r--libdino/src/service/call_store.vala9
1 files changed, 6 insertions, 3 deletions
diff --git a/libdino/src/service/call_store.vala b/libdino/src/service/call_store.vala
index fa6e63ee..bfc8255f 100644
--- a/libdino/src/service/call_store.vala
+++ b/libdino/src/service/call_store.vala
@@ -30,7 +30,7 @@ namespace Dino {
cache_call(call);
}
- public Call? get_call_by_id(int id) {
+ public Call? get_call_by_id(int id, Conversation conversation) {
Call? call = calls_by_db_id[id];
if (call != null) {
return call;
@@ -38,14 +38,17 @@ namespace Dino {
RowOption row_option = db.call.select().with(db.call.id, "=", id).row();
- return create_call_from_row_opt(row_option);
+ return create_call_from_row_opt(row_option, conversation);
}
- private Call? create_call_from_row_opt(RowOption row_opt) {
+ private Call? create_call_from_row_opt(RowOption row_opt, Conversation conversation) {
if (!row_opt.is_present()) return null;
try {
Call call = new Call.from_row(db, row_opt.inner);
+ if (conversation.type_.is_muc_semantic()) {
+ call.ourpart = conversation.counterpart.with_resource(call.ourpart.resourcepart);
+ }
cache_call(call);
return call;
} catch (InvalidJidError e) {