aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-10-20 19:26:42 +0200
committerfiaxh <git@lightrise.org>2022-10-20 19:27:01 +0200
commit2ab7374aa53f70b30765a02865d92e6d71c6e623 (patch)
tree8ed46c4a5b97215b3287d7c56fddf3d3edfac8ac /libdino/src/service
parentd4c674284ed4668fe5e2a323e7302856869707a8 (diff)
downloaddino-2ab7374aa53f70b30765a02865d92e6d71c6e623.tar.gz
dino-2ab7374aa53f70b30765a02865d92e6d71c6e623.zip
Fix segfault if reaction message has type normal
fixes #1294
Diffstat (limited to 'libdino/src/service')
-rw-r--r--libdino/src/service/reactions.vala8
1 files changed, 4 insertions, 4 deletions
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