From 0a29e42b496379c205a17525224f07bf94b545e1 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 15 May 2026 14:43:31 -0400 Subject: [PATCH] fix: correct event type in ForwardMessageDialog and poll response format - ForwardMessageDialog: use sendEvent instead of sendMessage to preserve the original event type (stickers, polls, etc.) - PollContent: use m.selections for stable m.poll.response (per spec), was incorrectly using m.responses --- src/app/components/message/content/PollContent.tsx | 2 +- src/app/features/room/message/ForwardMessageDialog.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/message/content/PollContent.tsx b/src/app/components/message/content/PollContent.tsx index cdbf446bf..16ecd31ed 100644 --- a/src/app/components/message/content/PollContent.tsx +++ b/src/app/components/message/content/PollContent.tsx @@ -60,7 +60,7 @@ export function PollContent({ if (isStable) { mx.sendEvent(roomId, 'm.poll.response' as any, { 'm.relates_to': { rel_type: 'm.reference', event_id: eventId }, - 'm.responses': [{ 'm.id': answerId }], + 'm.selections': [answerId], }); } else { mx.sendEvent(roomId, 'org.matrix.msc3381.poll.response' as any, { diff --git a/src/app/features/room/message/ForwardMessageDialog.tsx b/src/app/features/room/message/ForwardMessageDialog.tsx index 780824e2a..c1ecfa030 100644 --- a/src/app/features/room/message/ForwardMessageDialog.tsx +++ b/src/app/features/room/message/ForwardMessageDialog.tsx @@ -39,7 +39,7 @@ export function ForwardMessageDialog({ mEvent, onClose }: Props) { const forward = (roomId: string, roomName: string) => { const fwdContent: Record = { ...mEvent.getContent() }; delete fwdContent['m.relates_to']; - mx.sendMessage(roomId, fwdContent as any); + mx.sendEvent(roomId, mEvent.getType(), fwdContent as any); setSentTo(roomName); setTimeout(onClose, 1200); };