feat(companion): parse [LOC] in room messages + wire roomMessage event

Two receive→UI wiring gaps of the same class as the room-history fix:

- onSignedMessageRecv (room posts) didn't parse [LOC] live-location shares,
  while DM (onMessageRecv) and channel (onChannelMessageRecv) both do — so a
  guest sharing position in a room never appeared on the map/nearby. Resolve
  the signed sender prefix to a name and track by name, mirroring the channel
  path (unverified: only a 4-byte prefix is available here).

- UIEventType::roomMessage was defined but never emitted; room notifications
  rode on contactMessage and always played the global DM melody. Emit
  roomMessage for room posts and handle it explicitly (default DM melody, no
  per-sender lookup since the author varies); drop the now-duplicate dead case.

Build verified: WioTrackerL1 solo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MarekZegare4
2026-06-23 02:28:37 +02:00
co-authored by Claude Opus 4.8
parent 8adc313cc5
commit 79ebad58ae
2 changed files with 17 additions and 2 deletions
+5 -1
View File
@@ -1616,6 +1616,11 @@ void UITask::notify(UIEventType t) {
sn.playCH(_last_notif_ch_idx);
_last_notif_ch_idx = -1;
break;
case UIEventType::roomMessage:
// Rooms have many authors and no per-room melody pref, so use the default DM
// notification (no per-sender melody/mute lookup — the author varies per post).
sn.playDM(false, nullptr);
break;
case UIEventType::advertReceivedFlood:
case UIEventType::advertReceivedZeroHop:
sn.playAD(t == UIEventType::advertReceivedFlood);
@@ -1623,7 +1628,6 @@ void UITask::notify(UIEventType t) {
case UIEventType::ack:
buzzer.play("ack:d=32,o=8,b=120:c");
break;
case UIEventType::roomMessage:
case UIEventType::none:
default:
break;