Skip to content

Render m.sticker messages as images in timeline - #155

Merged
viktorstrate merged 1 commit into
viktorstrate:mainfrom
bmikaili:pr/render-stickers
Dec 3, 2026
Merged

viktorstrate merged 1 commit into
viktorstrate:mainfrom
bmikaili:pr/render-stickers

Conversation

@bmikaili

@bmikaili bmikaili commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Relates to #98.

MessageImageContentView currently only matches .message(.image). It does not handle incoming m.sticker timeline events.

  • Adds MessageImageContentView.image(from:) to map .message(.image) and .sticker(body:info:source:) to ImageMessageContent without a caption.
  • Routes supports(content:), configure(content:matrixClient:), and height(for:width:) through image(from:). Sets imageButton.setAccessibilityLabel(image.filename).

Testing

  • Added MessageImageContentViewStickerTests.stickerMapsToImageContentWithoutCaption() in Tests/MactrixAppTests/MessageImageContentViewStickerTests.swift.
  • Ran xcodebuild test -workspace Mactrix.xcworkspace -scheme Mactrix -destination 'platform=macOS' on pr/render-stickers (5198dea over 83b77ad). 262 tests passed across 28 suites (TEST SUCCEEDED).

Out of scope

  • Does not add a sticker picker or sticker sending UI.

@viktorstrate
viktorstrate merged commit c0c0b8a into viktorstrate:main Dec 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants