-
-
Notifications
You must be signed in to change notification settings - Fork 676
Open
Description
Expected behavior:
- Someone sends a poll message.
- The message gets some reactions; it gets edited or moved; and you star it.
- In mobile, you view it in the message list.
- The message shows up including its reactions, the "edited" marker, and the "starred" marker.
Actual behavior:
4. The message shows up without those things.
The cause of this is that in src/webview/html/message.js we render the reactions as part of the messageBody function:
return template`\
$!${processAlertWords(content, id, alertWords, flags)}
$!${isOutbox ? '<div class="loading-spinner outbox-spinner"></div>' : ''}
$!${messageTagsAsHtml(!!flags.starred[id], last_edit_timestamp)}
$!${messageReactionListAsHtml(reactions, ownUser.user_id, allImageEmojiById)}`;but for a widget message (including a poll message) we call widgetBody instead of messageBody:
const bodyHtml =
message.submessages && message.submessages.length > 0
? widgetBody(message, backgroundData.ownUser.user_id)
: messageBody(backgroundData, message);Instead, those last three lines of messageBody should move up the call stack, and get applied after we've called either widgetBody or processAlertWords.
(I'm not sure how things behave in local echo when you send a poll message, which is why the behavior description above doesn't include the outbox spinner. But clearly we should be showing the spinner when it's an outbox message.)