diff options
author | fiaxh <git@lightrise.org> | 2021-12-20 00:15:05 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-12-23 00:19:26 +0100 |
commit | f0c7dd0682fec8d72c644d8e54896de7bdc40ddb (patch) | |
tree | 0e275aa1fab7004cef7c92e16721d493b18bf8b6 /libdino/src/service/call_state.vala | |
parent | ff4e2540ae3bfab6873beb7e03ef5c6a5b9da1da (diff) | |
download | dino-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_state.vala')
-rw-r--r-- | libdino/src/service/call_state.vala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libdino/src/service/call_state.vala b/libdino/src/service/call_state.vala index 51563552..188a8321 100644 --- a/libdino/src/service/call_state.vala +++ b/libdino/src/service/call_state.vala @@ -126,7 +126,7 @@ public class Dino.CallState : Object { foreach (PeerState peer in peers_cpy) { peer.end(Xep.Jingle.ReasonElement.CANCEL); } - if (parent_muc != null) { + if (parent_muc != null && group_call != null) { XmppStream stream = stream_interactor.get_stream(call.account); if (stream == null) return; stream.get_module(Xep.MujiMeta.Module.IDENTITY).send_invite_retract_to_peer(stream, parent_muc, group_call.muc_jid, message_type); @@ -242,7 +242,12 @@ public class Dino.CallState : Object { XmppStream stream = stream_interactor.get_stream(call.account); if (stream == null) return; - Jid muc_jid = stream_interactor.get_module(MucManager.IDENTITY).default_muc_server[call.account] ?? new Jid("chat.jabberfr.org"); + Jid? muc_jid = null; + if (muc_jid == null) { + warning("Failed to initiate group call: MUC server not known."); + return; + } + muc_jid = new Jid("%08x@".printf(Random.next_int()) + muc_jid.to_string()); // TODO longer? debug("[%s] Converting call to groupcall %s", call.account.bare_jid.to_string(), muc_jid.to_string()); |