git » sdk » commit 0bb87c6

Assume reply is to server id for groupchat

author Stephen Paul Weber
2026-03-10 20:14:21 UTC
committer Stephen Paul Weber
2026-03-10 20:14:21 UTC
parent bf470a76cecc08eafe343268bd5ce5415b67516b

Assume reply is to server id for groupchat

This feels gross and brittle, OTOH it is what the XEP says to do. The
main reason we need this is for when we're re-parsing a sent message (eg
sqlite persistence)

borogove/Message.hx +1 -1

diff --git a/borogove/Message.hx b/borogove/Message.hx
index 7e81ae5..5374456 100644
--- a/borogove/Message.hx
+++ b/borogove/Message.hx
@@ -322,7 +322,7 @@ class Message {
 				replyToMessage.from = replyToJid == null ? null : JID.parse(replyToJid);
 				replyToMessage.senderId = isGroupchat ? replyToMessage.from?.asString() : replyToMessage.from?.asBare()?.asString();
 				replyToMessage.replyId = replyToID;
-				if (msg.serverIdBy != null && msg.serverIdBy != localJid.asBare().asString()) {
+				if ((msg.serverIdBy != null && msg.serverIdBy != localJid.asBare().asString()) || isGroupchat) {
 					replyToMessage.serverId = replyToID;
 				} else {
 					replyToMessage.localId = replyToID;