about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/mucwin.c4
-rw-r--r--src/ui/win_types.h1
-rw-r--r--src/ui/window.c1
-rw-r--r--src/ui/window_list.c1
4 files changed, 1 insertions, 6 deletions
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c
index 619037b5..4ffc1759 100644
--- a/src/ui/mucwin.c
+++ b/src/ui/mucwin.c
@@ -504,8 +504,6 @@ mucwin_outgoing_msg(ProfMucWin *mucwin, const char *const message, const char *c
 {
     assert(mucwin != NULL);
 
-    g_hash_table_insert(mucwin->sent_messages, strdup(id), NULL);
-
     ProfWin *window = (ProfWin*)mucwin;
     char *mynick = muc_nick(mucwin->roomjid);
 
@@ -529,7 +527,7 @@ mucwin_incoming_msg(ProfMucWin *mucwin, ProfMessage *message, GSList *mentions,
     assert(mucwin != NULL);
     int flags = 0;
 
-    if (message->id && g_hash_table_remove(mucwin->sent_messages, message->id)) {
+    if (message_is_sent_by_us(message)) {
         /* Ignore reflection messages */
         return;
     }
diff --git a/src/ui/win_types.h b/src/ui/win_types.h
index bf5a181c..68c7b674 100644
--- a/src/ui/win_types.h
+++ b/src/ui/win_types.h
@@ -172,7 +172,6 @@ typedef struct prof_muc_win_t {
     unsigned long memcheck;
     char *enctext;
     char *message_char;
-    GHashTable *sent_messages;
     GDateTime *last_msg_timestamp;
 } ProfMucWin;
 
diff --git a/src/ui/window.c b/src/ui/window.c
index c1624a50..631b4468 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -198,7 +198,6 @@ 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;
 
diff --git a/src/ui/window_list.c b/src/ui/window_list.c
index 36e63477..ce414c2e 100644
--- a/src/ui/window_list.c
+++ b/src/ui/window_list.c
@@ -561,7 +561,6 @@ wins_close_by_num(int i)
                 ProfMucWin *mucwin = (ProfMucWin*)window;
                 autocomplete_remove(wins_ac, mucwin->roomjid);
                 autocomplete_remove(wins_close_ac, mucwin->roomjid);
-                g_hash_table_remove_all(mucwin->sent_messages);
 
                 if (mucwin->last_msg_timestamp) {
                     g_date_time_unref(mucwin->last_msg_timestamp);