Skip to content

Add support for MTProto rich messages#669

Open
jnordlund wants to merge 4 commits into
morethanwords:masterfrom
jnordlund:feature/rich_text_messages
Open

Add support for MTProto rich messages#669
jnordlund wants to merge 4 commits into
morethanwords:masterfrom
jnordlund:feature/rich_text_messages

Conversation

@jnordlund

Copy link
Copy Markdown

Summary

  • Render incoming message.rich_message payloads instead of falling back to unsupported media text.
  • Add MTProto schema/runtime support for RichMessage, message.rich_message, and messages.getRichMessage.
  • Reuse Instant View block rendering for rich-message blocks and add reply/search summary support.
  • Fix a worker port attachment race that could keep the app stuck while loading dialogs.

Notes

Sending rich messages is out of scope. This PR handles receiving, rendering, summary text, and fetching full rich messages.

Fixes #664

Verification

  • node ./src/scripts/generate_mtproto_types.js src/
  • ./node_modules/.bin/tsc --noEmit --pretty false
  • ./node_modules/.bin/vitest run src/tests/richMessage.test.ts
  • ./node_modules/.bin/vite build
  • git diff --check
  • Browser verification on http://localhost:8080/
Threaded workers can post MessagePorts before createProxyWorkerURLs has populated the URL list. Cap attachment by the configured thread count so the first valid worker port is not closed prematurely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant