Skip to content

Bundled relations in unsigned are not taken into account - Show edits and reactions on message that occurred on a different day #8

Open
@MadLittleMods

Description

@MadLittleMods

Currently, the archive only shows reactions for messages when they occurred on the same day and the m.reaction event is available in the events displayed.

But reactions can happen across multiple days.

The homeserver already packages this info under event.unsigned['m.relations']['m.annotation'] but Hydrogen doesn't display it currently.

{
  "type": "m.room.message",
  "room_id": "!HBehERstyQBxyJDLfR:my.synapse.server",
  "sender": "@ericgittertester:my.synapse.server",
  "content": {
    "org.matrix.msc1767.text": "jyjyt",
    "body": "jyjyt",
    "msgtype": "m.text"
  },
  "origin_server_ts": 1645157112445,
  "unsigned": {
    "age": 572574399,
    "m.relations": {
      "m.annotation": {
        "chunk": [
          {
            "type": "m.reaction",
            "key": "😈",
            "count": 2
          },
          {
            "type": "m.reaction",
            "key": "🧠",
            "count": 1
          }
        ]
      }
    }
  },
  "event_id": "$eWlSLamYKEOS9XI08Fas9vhzSjzhnE7flyuhvmF6qtA",
  "user_id": "@ericgittertester:my.synapse.server",
  "age": 572574399
}

Message edits

This also happens with message edits. Hydrogen displays all events in the main timeline including edits separately and doesn't take into account the unsigned new content that is bundled with the original event.

Related to element-hq/hydrogen-web#535

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-archive-room-viewThe view to look at a room day by day in the archiveT-DefectSomething isn't working. Bugs, crashes, or other reported issues.help wantedPR's welcome to fix this issue. It probably has a potential solution documented in the issue.hydrogenIssues which involve https://github.com/vector-im/hydrogen-web

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions