From 2ab7374aa53f70b30765a02865d92e6d71c6e623 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Thu, 20 Oct 2022 19:26:42 +0200 Subject: Fix segfault if reaction message has type normal fixes #1294 --- libdino/src/service/reactions.vala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libdino/src/service') diff --git a/libdino/src/service/reactions.vala b/libdino/src/service/reactions.vala index 95bb0fa4..4b5c0731 100644 --- a/libdino/src/service/reactions.vala +++ b/libdino/src/service/reactions.vala @@ -364,7 +364,7 @@ public class Dino.Reactions : StreamInteractionModule, Object { ReactionsTime reactions_time = null; if (stanza.type_ == MessageStanza.TYPE_GROUPCHAT) { reactions_time = get_muc_user_reactions(account, content_item_id, occupant_id, real_jid); - } else if (stanza.type_ == MessageStanza.TYPE_CHAT) { + } else { reactions_time = get_chat_user_reactions(account, content_item_id, from_jid); } @@ -374,10 +374,10 @@ public class Dino.Reactions : StreamInteractionModule, Object { } // Save reactions - if (stanza.type_ == MessageStanza.TYPE_CHAT) { - save_chat_reactions(account, from_jid, content_item_id, reaction_time_long, reactions); - } else if (stanza.type_ == MessageStanza.TYPE_GROUPCHAT) { + if (stanza.type_ == MessageStanza.TYPE_GROUPCHAT) { save_muc_reactions(account, content_item_id, from_jid, occupant_id, real_jid, reaction_time_long, reactions); + } else { + save_chat_reactions(account, from_jid, content_item_id, reaction_time_long, reactions); } // Notify about reaction changes -- cgit v1.2.3-70-g09d2