element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
68 stars 11 forks source link

[Tech] Implement poll history cache (MSC4013) in the rust SDK #2183

Open alfogrillo opened 9 months ago

alfogrillo commented 9 months ago

Description

MSC4013 TL;DR;

  1. Each room has a new state event m.room.poll_history
    • Ideally this event is sent when the room is created together with other initial state events (example of initial state event: m.room.encryption)
  2. Every time a client starts a poll it references the m.room.poll_history state event using m.relates_to.
  3. (out of scope for now) In the poll history we can call the relations API to fetch quickly all the events related with m.room.poll_history (which are the m.poll.start events). Only polls created with this approach will be visible in the history (polls already in the timeline won't be visible).

Size

M?

Dependencies

Acceptance criteria

Out of scope

Open questions

Subtasks

### Android
### iOS
### Other
jonnyandrew commented 9 months ago

Blocked waiting on a resolution for https://github.com/matrix-org/matrix-spec-proposals/pull/4013#discussion_r1408126980, as after this change it would not be possible to:

See internal disccusion

@VolkerJunginger, @langleyd