diff options
author | fiaxh <git@lightrise.org> | 2021-12-18 21:34:39 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-12-18 21:34:39 +0100 |
commit | 78bb2bbddaf587de77f67c404e8ed5083f16bf8a (patch) | |
tree | 0f61e0e2d4668fd58707423dcb44fa98856220be /libdino/src/entity | |
parent | 2b3d150949fe1b3c4107e497be7dac8e2ba734aa (diff) | |
download | dino-78bb2bbddaf587de77f67c404e8ed5083f16bf8a.tar.gz dino-78bb2bbddaf587de77f67c404e8ed5083f16bf8a.zip |
Add calls in private MUCs via a MUJI MUC
Diffstat (limited to 'libdino/src/entity')
-rw-r--r-- | libdino/src/entity/call.vala | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libdino/src/entity/call.vala b/libdino/src/entity/call.vala index 5221a807..3b48f664 100644 --- a/libdino/src/entity/call.vala +++ b/libdino/src/entity/call.vala @@ -39,11 +39,6 @@ namespace Dino.Entities { id = row[db.call.id]; account = db.get_account_by_id(row[db.call.account_id]); - counterpart = db.get_jid_by_id(row[db.call.counterpart_id]); - string counterpart_resource = row[db.call.counterpart_resource]; - if (counterpart_resource != null) counterpart = counterpart.with_resource(counterpart_resource); - counterparts.add(counterpart); - string our_resource = row[db.call.our_resource]; if (our_resource != null) { ourpart = account.bare_jid.with_resource(our_resource); @@ -66,6 +61,14 @@ namespace Dino.Entities { if (counterpart == null) counterpart = peer; } + counterpart = db.get_jid_by_id(row[db.call.counterpart_id]); + string counterpart_resource = row[db.call.counterpart_resource]; + if (counterpart_resource != null) counterpart = counterpart.with_resource(counterpart_resource); + if (counterparts.is_empty) { + counterparts.add(counterpart); + counterpart = counterpart; + } + notify.connect(on_update); } |