aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-01-04 12:34:16 +0100
committerfiaxh <git@lightrise.org>2022-01-04 21:40:51 +0100
commit33104a778d6bcfb37577d14d28f68442467636a9 (patch)
treeba3f7c945739517781b21554b04d8575d51b0894
parent85f4bddf99f92647e67e7b69c1e1902730f5ea8f (diff)
downloaddino-33104a778d6bcfb37577d14d28f68442467636a9.tar.gz
dino-33104a778d6bcfb37577d14d28f68442467636a9.zip
Add 'unknown' encryption state for establishing calls
Currently, they are Encryption.NONE and thus marked as unencrypted in encrypted conversations
-rw-r--r--libdino/src/entity/encryption.vala1
-rw-r--r--libdino/src/service/calls.vala3
-rw-r--r--main/src/ui/conversation_content_view/conversation_item_skeleton.vala2
3 files changed, 5 insertions, 1 deletions
diff --git a/libdino/src/entity/encryption.vala b/libdino/src/entity/encryption.vala
index 25d55eb1..193d741b 100644
--- a/libdino/src/entity/encryption.vala
+++ b/libdino/src/entity/encryption.vala
@@ -6,6 +6,7 @@ public enum Encryption {
OMEMO,
DTLS_SRTP,
SRTP,
+ UNKNOWN,
}
} \ No newline at end of file
diff --git a/libdino/src/service/calls.vala b/libdino/src/service/calls.vala
index 76cd0c68..b30c2755 100644
--- a/libdino/src/service/calls.vala
+++ b/libdino/src/service/calls.vala
@@ -42,6 +42,7 @@ namespace Dino {
call.counterpart = conversation.counterpart;
call.ourpart = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account) ?? conversation.account.full_jid;
call.time = call.local_time = call.end_time = new DateTime.now_utc();
+ call.encryption = Encryption.UNKNOWN;
call.state = Call.State.RINGING;
stream_interactor.get_module(CallStore.IDENTITY).add_call(call, conversation);
@@ -227,6 +228,7 @@ namespace Dino {
call.add_peer(call.counterpart);
call.account = account;
call.time = call.local_time = call.end_time = new DateTime.now_utc();
+ call.encryption = Encryption.UNKNOWN;
Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(call.counterpart.bare_jid, account, Conversation.Type.CHAT);
@@ -284,6 +286,7 @@ namespace Dino {
call.counterpart = inviter_jid;
call.account = account;
call.time = call.local_time = call.end_time = new DateTime.now_utc();
+ call.encryption = Encryption.UNKNOWN;
call.state = Call.State.RINGING;
Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(inviter_jid.bare_jid, account);
diff --git a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
index 73f7c671..ae2e6018 100644
--- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
+++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
@@ -161,7 +161,7 @@ public class ItemMetaDataHeader : Box {
Application app = GLib.Application.get_default() as Application;
ContentMetaItem ci = item as ContentMetaItem;
- if (item.encryption != Encryption.NONE && ci != null) {
+ if (item.encryption != Encryption.NONE && item.encryption != Encryption.UNKNOWN && ci != null) {
Widget? widget = null;
foreach(var e in app.plugin_registry.encryption_list_entries) {
if (e.encryption == item.encryption) {