matrix-org / matrix-org/matrix-rust-sdk
Support sending stickers (m.sticker) through Timeline::send() with local echo
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
matrix-sdk-ui's Timeline already fully supports receiving stickers: MsgLikeKind::Sticker is a first-class variant of TimelineItemContent, and participates in reactions/threads/replies aggregation (#4839, #5045), etc.
However, on the sending side, Timeline::send() currently only documents support for RoomMessageEventContent-like content ("this method doesn't currently allow custom message types"), and Timeline::send_attachment() explicitly "does not currently support local echoes". As a result, there doesn't seem to be a way to send an m.sticker event and have it appear in the timeline as a local echo the same way a regular text message does (sending state, retry on failure, etc.).
This was mentioned in passing in #5427 ("Same would apply to stickers I guess if we were to ever implement sending support for them") but I couldn't find a tracking issue for it.
# **Request:**
Add support for sending m.sticker events (e.g. a send_sticker() method, or extending send() to accept sticker content) with proper local echo support, consistent with how regular messages are handled.
# **Use case:**
I'm working on implementing sticker sending in Element X Android (element-hq/element-x-android), which uses this SDK via the FFI bindings. Without native support for sending stickers with local echo, this feature can't be implemented cleanly on the client side — it would require Kotlin-side workarounds to fake the sending state, retry behavior, etc. that the Timeline API already handles for other event types. There's an open feature request for this on the Element X Android side too: element-hq/element-x-android#4162.
Contributor guide
Research direction
Start by tracing Timeline::send() and Timeline::send_attachment(), then inspect the existing MsgLikeKind::Sticker and TimelineItemContent handling. Compare regular message local echoes, sending state, and retry behavior with the sticker event path. Done means m.sticker content can be sent through the Timeline API and appears with equivalent local-echo behavior for FFI consumers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100