Fix carbon logging

Regards https://github.com/profanity-im/profanity/issues/1342
This commit is contained in:
Michael Vetter
2020-05-27 22:06:04 +02:00
parent d240eb629c
commit d4692b1b2d
3 changed files with 18 additions and 14 deletions

View File

@@ -164,12 +164,16 @@ log_database_close(void)
void
log_database_add_incoming(ProfMessage *message)
{
const char *jid = connection_get_fulljid();
Jid *myjid = jid_create(jid);
if (message->to_jid) {
_add_to_db(message, NULL, message->from_jid, message->to_jid);
} else {
const char *jid = connection_get_fulljid();
Jid *myjid = jid_create(jid);
_add_to_db(message, NULL, message->from_jid, myjid);
_add_to_db(message, NULL, message->from_jid, myjid);
jid_destroy(myjid);
jid_destroy(myjid);
}
}
static void