mirror of
https://github.com/MeshCore-Beacon/beacon-web.git
synced 2026-10-22 12:42:27 +00:00
feat: decrypted channel messages, scopes in ws
This commit is contained in:
1 parent
47c1813471
commit
eb50f310db
4 files changed
+35
-6
No files matched your search
@@ -301,16 +301,15 @@ function GroupTextPayload({ payload }: PayloadProps) {
|
||||
<span className="text-text-normal font-semibold">{String(decrypted.sender)}</span>
|
||||
</div>
|
||||
)}
|
||||
{decrypted.message != null && (
|
||||
{decrypted.content != null && (
|
||||
<div>
|
||||
<span className="text-text-dim">Message </span>
|
||||
<span className="text-text-bright break-all">{String(decrypted.message)}</span>
|
||||
<span className="text-text-bright break-all">{String(decrypted.content)}</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex gap-x-4 text-text-dim">
|
||||
{decrypted.timestamp != null && <span>{formatUnixTs(decrypted.timestamp as number)}</span>}
|
||||
{decrypted.flags != null && <span>Flags {String(decrypted.flags)}</span>}
|
||||
</div>
|
||||
{decrypted.sentAt != null && (
|
||||
<div className="text-text-dim">{formatTimestamp(decrypted.sentAt as number)}</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -143,6 +143,7 @@ export function usePackets() {
|
||||
firstHeardAt: data.observation.heardAt,
|
||||
lastHeardAt: data.observation.heardAt,
|
||||
observationCount: data.packet.observationCount,
|
||||
scope: data.packet.scope,
|
||||
latestObserver: {
|
||||
id: data.observation.observerId,
|
||||
displayName: data.observation.observerName,
|
||||
|
||||
@@ -41,6 +41,7 @@ export interface WsPacketObservation {
|
||||
routeTypeName: string;
|
||||
isFirstObservation: boolean;
|
||||
observationCount: number;
|
||||
scope?: string; // matched transport scope name; omitted when none matched
|
||||
};
|
||||
observation: {
|
||||
observerId: string;
|
||||
|
||||
Reference in new issue
Block a user