Skip to content

Poll messages should show reactions, tags, and outbox spinner #5338

@gnprice

Description

@gnprice

Expected behavior:

  1. Someone sends a poll message.
  2. The message gets some reactions; it gets edited or moved; and you star it.
  3. In mobile, you view it in the message list.
  4. 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.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions