about summary refs log tree commit diff stats
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-04-11 10:58:22 +0200
committerGitHub <noreply@github.com>2019-04-11 10:58:22 +0200
commit61df0c8e8513a1aa9912e37019a63778ec3ed06c (patch)
treea52850f2f5fc225759c2287d1672ed22b5ef7f0a /src/ui/window.c
parent6b064cfde4456c25bd9dbcbfe0a79262ebcb3599 (diff)
parentf75e1d7a7b05c68f03b6b13163ac9f2b8824e7df (diff)
downloadprofani-tty-61df0c8e8513a1aa9912e37019a63778ec3ed06c.tar.gz
Merge pull request #1039 from paulfariello/feature/omemo
Add basic OMEMO support.
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index cc2c2062..12b6c15b 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -143,6 +143,7 @@ win_create_chat(const char *const barejid)
     new_win->otr_is_trusted = FALSE;
     new_win->pgp_recv = FALSE;
     new_win->pgp_send = FALSE;
+    new_win->is_omemo = FALSE;
     new_win->history_shown = FALSE;
     new_win->unread = 0;
     new_win->state = chat_state_new();
@@ -196,6 +197,8 @@ win_create_muc(const char *const roomjid)
     }
     new_win->enctext = NULL;
     new_win->message_char = NULL;
+    new_win->is_omemo = FALSE;
+    new_win->sent_messages = g_hash_table_new_full(g_str_hash, g_str_equal, free, NULL);
 
     new_win->memcheck = PROFMUCWIN_MEMCHECK;
 
@@ -1057,6 +1060,8 @@ win_print_incoming(ProfWin *window, GDateTime *timestamp,
                 enc_char = prefs_get_otr_char();
             } else if (enc_mode == PROF_MSG_PGP) {
                 enc_char = prefs_get_pgp_char();
+            } else if (enc_mode == PROF_MSG_OMEMO) {
+                enc_char = prefs_get_omemo_char();
             }
             _win_printf(window, enc_char, 0, timestamp, NO_ME, THEME_TEXT_THEM, from, "%s", message);
             break;