about summary refs log tree commit diff stats
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-04-25 17:13:22 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-04-25 17:19:02 +0200
commit85520ecdc5d2e6ac6654817572b8fd99e43e25d9 (patch)
tree6837c17e9a762cf0f11d06ffd9b15a9ce6a34b48 /src/ui/window.c
parent570863df1b84f022f21f868dbdc4d2b42aebe914 (diff)
downloadprofani-tty-85520ecdc5d2e6ac6654817572b8fd99e43e25d9.tar.gz
Remove unanimous MAM display
For some time users could choose to have the old way "unanimous" where
all the MUC history is just grey (or whatever was set). Now it is always
just displayed like regular new incoming MUC text.
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 2ebf7a31..763f389d 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1223,29 +1223,19 @@ win_print_history(ProfWin *window, const ProfMessage *const message)
 {
     g_date_time_ref(message->timestamp);
 
-    int flags = 0;
-
     char *display_name;
-    if (message->type == PROF_MSG_TYPE_MUC) {
-        display_name = strdup(message->from_jid->resourcepart);
+    int flags = 0;
+    const char *jid = connection_get_fulljid();
+    Jid *jidp = jid_create(jid);
 
-        char *muc_history_color = prefs_get_string(PREF_HISTORY_COLOR_MUC);
-        if (g_strcmp0(muc_history_color, "unanimous") == 0) {
-            flags = NO_COLOUR_FROM;
-        }
-        g_free(muc_history_color);
+    if (g_strcmp0(jidp->barejid, message->from_jid->barejid) == 0) {
+        display_name = strdup("me");
     } else {
-        const char *jid = connection_get_fulljid();
-        Jid *jidp = jid_create(jid);
-
-        if (g_strcmp0(jidp->barejid, message->from_jid->barejid) == 0) {
-            display_name = strdup("me");
-        } else {
-            display_name = roster_get_msg_display_name(message->from_jid->barejid, message->from_jid->resourcepart);
-        }
-        jid_destroy(jidp);
+        display_name = roster_get_msg_display_name(message->from_jid->barejid, message->from_jid->resourcepart);
     }
 
+    jid_destroy(jidp);
+
     buffer_append(window->layout->buffer, "-", 0, message->timestamp, flags, THEME_TEXT_HISTORY, display_name, NULL, message->plain, NULL, NULL);
     _win_print_internal(window, "-", 0, message->timestamp, flags, THEME_TEXT_HISTORY, display_name, message->plain, NULL);