The meshcore-open client sends several rich-chat features as ordinary plaintext mesh messages. Remote Terminal currently displays the raw encoded strings, e.g.:
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.)
The meshcore-open client sends several rich-chat features as ordinary plaintext mesh messages. Remote Terminal currently displays the raw encoded strings, e.g.:
It'd be nice for remote term to recognize and render these. The relevant formats:
g:g:<gifId>→https://media.giphy.com/media/<gifId>/giphy.gifr:r:<hash>:<index>(4 hex : 2 hex)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'sString.hashCode & 0xFFFFover"<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 literalr:....(Other prefixes meshcore-open uses, for completeness:
s:smaz-compressed text,m:location,V1|reserved.)