From b3ed21366879c53792277c069766e2d7f6cd5c5b Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Mon, 7 Oct 2019 00:01:18 +0200 Subject: Improve MUC 1:1 logging If we get a private message from a user in a MUC profanity shows this like: `profanity@roomsASDF.dismail.de/Martin: Hi` This was so far logged at: `~/.local/share/profanity/chatlogs/my-account-at-server/profanity_at_rooms.dismail.de/2019_09_04.log` as: ``` 10:48:13 - profanity@rooms.dismail.de: Hi ``` So the nickname was not saved anywhere. This is due to us not knowing whether we got a regular message from user@server.org/resource or a MUC PM from room@server.org/user. We now check for `` and add the resourcepart to the logging if we get it. The file will be created at `~/.local/share/profanity/chatlogs/my-account-at-server/profanity_at_rooms.dismail.de_nick` and look like: ``` 23:59:43 - nick: Hi ``` Fix https://github.com/profanity-im/profanity/issues/1184 --- src/xmpp/message.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/xmpp/message.h') diff --git a/src/xmpp/message.h b/src/xmpp/message.h index 7660e9a9..badfba72 100644 --- a/src/xmpp/message.h +++ b/src/xmpp/message.h @@ -56,6 +56,7 @@ typedef struct prof_message_t { GDateTime *timestamp; prof_enc_t enc; gboolean trusted; + gboolean mucuser; } ProfMessage; typedef int(*ProfMessageCallback)(xmpp_stanza_t *const stanza, void *const userdata); -- cgit 1.4.1-2-gfad0