diff options
author | fiaxh <git@lightrise.org> | 2022-11-04 15:57:58 -0600 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-11-04 15:57:58 -0600 |
commit | 7a19a25156a73e7e6b6d77fabc7621e7d2c443f0 (patch) | |
tree | 44c9d9ba95afda5b2a49a9f4d347e4641f2f5773 /libdino/src/service/reactions.vala | |
parent | e62955d3cf266a7f7ff0f2085a64f1c99021127c (diff) | |
download | dino-7a19a25156a73e7e6b6d77fabc7621e7d2c443f0.tar.gz dino-7a19a25156a73e7e6b6d77fabc7621e7d2c443f0.zip |
Clean up log outputs
Diffstat (limited to 'libdino/src/service/reactions.vala')
-rw-r--r-- | libdino/src/service/reactions.vala | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/libdino/src/service/reactions.vala b/libdino/src/service/reactions.vala index 4b5c0731..0006f4de 100644 --- a/libdino/src/service/reactions.vala +++ b/libdino/src/service/reactions.vala @@ -261,7 +261,7 @@ public class Dino.Reactions : StreamInteractionModule, Object { } // Store reaction infos for later processing after we got the message - print(@"Got reaction for $message_id but dont have message yet $(db.get_jid_id(stanza.from.bare_jid))\n"); + debug("Got reaction for %s but dont have message yet %s", message_id, db.get_jid_id(stanza.from.bare_jid).to_string()); if (!reaction_infos.has_key(message_id)) { reaction_infos[message_id] = new ArrayList<ReactionInfo>(); } @@ -297,9 +297,15 @@ public class Dino.Reactions : StreamInteractionModule, Object { } if (reaction_info == null) return; reaction_info_list.remove(reaction_info); - if (reaction_info_list.is_empty) reaction_infos.unset(message.stanza_id); + if (reaction_info_list.is_empty) { + if (conversation.type_ == Conversation.Type.GROUPCHAT) { + reaction_infos.unset(message.server_id); + } else { + reaction_infos.unset(message.stanza_id); + } + } - print(@"Got message for reaction\n"); + debug("Got message for reaction %s", message.stanza_id); process_reaction_for_message(message.id, reaction_info); } @@ -400,16 +406,14 @@ public class Dino.Reactions : StreamInteractionModule, Object { } } - print("reactions were: "); + debug("reactions were: "); foreach (string reac in current_reactions) { - print(reac + " "); + debug(reac); } - print("\n"); - print("reactions new : "); + debug("reactions new : "); foreach (string reac in reactions) { - print(reac + " "); + debug(reac); } - print("\n"); } private void save_chat_reactions(Account account, Jid jid, int content_item_id, long reaction_time, Gee.List<string> reactions) { |