Skip to content

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

@alfogrillo

Description

@alfogrillo

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

  • None

Acceptance criteria

  • Each new created room will has a m.room.poll_history state event
  • Each new m.poll.start (including edits) event has a reference to the new m.room.poll_history state event

Out of scope

  • Using the MSC for building the poll history (for now we keep the old "backward pagination" approach)

Open questions

  • How can we publish the new m.room.poll_history state event in already existing rooms? Can HS admins publish it in the rooms with a script?
  • Will this change prevent polls hosting threads (see comment)

Subtasks

### Android
### iOS
### Other

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions