Skip to content

Feature: Render meshcore-open rich-chat payloads (GIFs, reactions) #291

@statico

Description

@statico

The meshcore-open client sends several rich-chat features as ordinary plaintext mesh messages. Remote Terminal currently displays the raw encoded strings, e.g.:

Image

It'd be nice for remote term to recognize and render these. The relevant formats:

Prefix Meaning Format Source
g: Giphy GIF g:<gifId>https://media.giphy.com/media/<gifId>/giphy.gif gif_helper.dart
r: Emoji reaction r:<hash>:<index> (4 hex : 2 hex) reaction_helper.dart

GIFs are trivial: regex ^g:([A-Za-z0-9_-]+)$ and embed the Giphy URL.

Reactions are harder. <index> indexes a fixed emoji list, but <hash> identifies the target message via Dart's String.hashCode & 0xFFFF over "<timestampSeconds><senderName?><first 5 chars>" — a non-standard hash that must be ported to attach a reaction to the right message. A simpler first step would be to just display reactions generically (e.g. 👍 reacted) instead of the literal r:....

(Other prefixes meshcore-open uses, for completeness: s: smaz-compressed text, m: location, V1| reserved.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions