mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 14:16:21 +00:00
Remove chat_log_get_previous()
We now dont get the log files from the text files via chat_log_get_previous() anymore. We use the sql backend via log_database_get_previous_chat(). So far it just has the same behaviour like chat_log_get_previous(), except that in _chatwin_history() we don't pass the sender to win_print_history() which should be fixed in a commit soon. And log_database_get_previous_chat() can later easily be expanded to fix https://github.com/profanity-im/profanity/issues/205.
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
#include "omemo/omemo.h"
|
||||
#endif
|
||||
|
||||
static void _chatwin_history(ProfChatWin *chatwin, const char *const contact);
|
||||
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);
|
||||
|
||||
ProfChatWin*
|
||||
@@ -478,14 +478,10 @@ chatwin_unset_outgoing_char(ProfChatWin *chatwin)
|
||||
}
|
||||
|
||||
static void
|
||||
_chatwin_history(ProfChatWin *chatwin, const char *const contact)
|
||||
_chatwin_history(ProfChatWin *chatwin, const char *const contact_barejid)
|
||||
{
|
||||
if (!chatwin->history_shown) {
|
||||
Jid *jid = jid_create(connection_get_fulljid());
|
||||
//GSList *history = chat_log_get_previous(jid->barejid, contact);
|
||||
// TODO: jid not needed
|
||||
GSList *history = log_database_get_previous_chat(jid->barejid, contact);
|
||||
jid_destroy(jid);
|
||||
GSList *history = log_database_get_previous_chat(contact_barejid);
|
||||
GSList *curr = history;
|
||||
|
||||
while (curr) {
|
||||
|
||||
Reference in New Issue
Block a user