mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-07 09:13:04 +02:00
Add global message search and more e2e tests
This commit is contained in:
@@ -2,7 +2,7 @@ import type { Channel, Contact, Conversation } from '../types';
|
||||
import { getContactDisplayName } from './pubkey';
|
||||
|
||||
interface ParsedHashConversation {
|
||||
type: 'channel' | 'contact' | 'raw' | 'map' | 'visualizer';
|
||||
type: 'channel' | 'contact' | 'raw' | 'map' | 'visualizer' | 'search';
|
||||
/** Conversation identity token (channel key or contact public key, or legacy name token) */
|
||||
name: string;
|
||||
/** Optional human-readable label segment (ignored for identity resolution) */
|
||||
@@ -29,6 +29,10 @@ export function parseHashConversation(): ParsedHashConversation | null {
|
||||
return { type: 'visualizer', name: 'visualizer' };
|
||||
}
|
||||
|
||||
if (hash === 'search') {
|
||||
return { type: 'search', name: 'search' };
|
||||
}
|
||||
|
||||
// Check for map with focus: #map/focus/{pubkey_prefix}
|
||||
if (hash.startsWith('map/focus/')) {
|
||||
const focusKey = hash.slice('map/focus/'.length);
|
||||
@@ -107,6 +111,7 @@ function getConversationHash(conv: Conversation | null): string {
|
||||
if (conv.type === 'raw') return '#raw';
|
||||
if (conv.type === 'map') return '#map';
|
||||
if (conv.type === 'visualizer') return '#visualizer';
|
||||
if (conv.type === 'search') return '#search';
|
||||
|
||||
// Use immutable IDs for identity, append readable label for UX.
|
||||
if (conv.type === 'channel') {
|
||||
|
||||
Reference in New Issue
Block a user