Timestamp massaging in send_state_event

Open
#151 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start at the send_state_event entry point and inspect how state events are currently sent. Compare its API with the timestamp-capable message and state event methods described in the issue, then trace the application-service use case. Done means the requested timestamp behavior is supported for send_state_event without breaking existing callers.

Written by the indexing model from the issue text.

Description

Some client API (application service) methods do not seem to have a way of doing timestamp massaging from within Mautrix methods.

Some methods like send_text, react and send_image do accept an undocumented timestamp parameter, but other methods like ensure_joined, invite_user, join_room, pin_message, etc do not have this.

This would be useful to write an application service that lets you import messages from another platform to Matrix, including room join and message pin events (instead of inviting and joining all ghost users prior to bridging messages).


Update: I see that only the methods to send message events and state events in the Matrix API itself let you change the timestamp, so for a join I'd need to manually send a state event. I can probably do that if it's more of a Matrix limitation then.


It would be nice for other methods that ultimately result in a state event (even if only in the homeserver backend) to accept the timestamp parameter as well, and manually send state events if it is specified. But first, timestamp needs to be supported in send_state_event.

Dominant language
Python
Stars
249
Forks
84
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mautrix/python

All issues in mautrix/python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.