1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Quick and dirty display of MAM messages

This commit is contained in:
Michael Vetter 2020-04-08 17:51:55 +02:00
parent 38273fef5c
commit e23bc38083

View File

@ -57,7 +57,7 @@
#include "omemo/omemo.h" #include "omemo/omemo.h"
#endif #endif
static void _chatwin_history(ProfChatWin *chatwin, const char *const contact_barejid); /*static void _chatwin_history(ProfChatWin *chatwin, const char *const contact_barejid);*/
static void _chatwin_set_last_message(ProfChatWin *chatwin, const char *const id, const char *const message); static void _chatwin_set_last_message(ProfChatWin *chatwin, const char *const id, const char *const message);
ProfChatWin* ProfChatWin*
@ -67,7 +67,7 @@ chatwin_new(const char *const barejid)
ProfChatWin *chatwin = (ProfChatWin *)window; ProfChatWin *chatwin = (ProfChatWin *)window;
if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) { if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) {
_chatwin_history(chatwin, barejid); //_chatwin_history(chatwin, barejid);
} }
// if the contact is offline, show a message // if the contact is offline, show a message
@ -87,6 +87,7 @@ chatwin_new(const char *const barejid)
} }
#endif #endif
iq_mam_request(chatwin);
return chatwin; return chatwin;
} }
@ -278,7 +279,7 @@ chatwin_incoming_msg(ProfChatWin *chatwin, ProfMessage *message, gboolean win_cr
chatwin->unread++; chatwin->unread++;
if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) { if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) {
_chatwin_history(chatwin, chatwin->barejid); // _chatwin_history(chatwin, chatwin->barejid);
} }
// show users status first, when receiving message via delayed delivery // show users status first, when receiving message via delayed delivery
@ -477,6 +478,7 @@ chatwin_unset_outgoing_char(ProfChatWin *chatwin)
} }
} }
/*
static void static void
_chatwin_history(ProfChatWin *chatwin, const char *const contact_barejid) _chatwin_history(ProfChatWin *chatwin, const char *const contact_barejid)
{ {
@ -494,6 +496,7 @@ _chatwin_history(ProfChatWin *chatwin, const char *const contact_barejid)
g_slist_free_full(history, (GDestroyNotify)message_free); g_slist_free_full(history, (GDestroyNotify)message_free);
} }
} }
*/
static void static void
_chatwin_set_last_message(ProfChatWin *chatwin, const char *const id, const char *const message) _chatwin_set_last_message(ProfChatWin *chatwin, const char *const id, const char *const message)