about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2019-03-19 12:55:56 +0100
committerPaul Fariello <paul@fariello.eu>2019-04-10 17:12:31 +0200
commite5b01ed71b415c51abcdb63bb4dc1482b0d9248d (patch)
treec3f76c907e5f1693779c9b75ca60ff1d53da69ba
parent88670a7f0b1275d9a0b2eebc0cdf5ff0e1cdc337 (diff)
downloadprofani-tty-e5b01ed71b415c51abcdb63bb4dc1482b0d9248d.tar.gz
Add OMEMO state in titlebar in MUC
-rw-r--r--src/ui/titlebar.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c
index 6c8fe3aa..e1758d81 100644
--- a/src/ui/titlebar.c
+++ b/src/ui/titlebar.c
@@ -321,6 +321,21 @@ _show_muc_privacy(ProfMucWin *mucwin)
     int bracket_attrs = theme_attrs(THEME_TITLE_BRACKET);
     int encrypted_attrs = theme_attrs(THEME_TITLE_ENCRYPTED);
 
+    if (mucwin->is_omemo) {
+        wprintw(win, " ");
+        wattron(win, bracket_attrs);
+        wprintw(win, "[");
+        wattroff(win, bracket_attrs);
+        wattron(win, encrypted_attrs);
+        wprintw(win, "OMEMO");
+        wattroff(win, encrypted_attrs);
+        wattron(win, bracket_attrs);
+        wprintw(win, "]");
+        wattroff(win, bracket_attrs);
+
+        return;
+    }
+
     if (mucwin->enctext) {
         wprintw(win, " ");
         wattron(win, bracket_attrs);