Patch up changes -- fix up docs, fix react hooks issue

This commit is contained in:
Jack Kingsman
2026-02-07 21:25:19 -08:00
parent a9d9d7a7b4
commit f7792bd75e
2 changed files with 9 additions and 9 deletions

View File

@@ -148,7 +148,7 @@ await api.getHealth();
// Radio
await api.getRadioConfig();
await api.updateRadioConfig({ name: 'MyRadio' });
await api.sendAdvertisement(true);
await api.sendAdvertisement();
// Contacts/Channels
await api.getContacts();

View File

@@ -239,6 +239,14 @@ export function MessageList({
}
}, []);
// Sort messages by received_at ascending (oldest first)
// Note: Deduplication is handled by useConversationMessages.addMessageIfNew()
// and the database UNIQUE constraint on (type, conversation_key, text, sender_timestamp)
const sortedMessages = useMemo(
() => [...messages].sort((a, b) => a.received_at - b.received_at),
[messages]
);
// Look up contact by public key
const getContact = (conversationKey: string | null): Contact | null => {
if (!conversationKey) return null;
@@ -301,14 +309,6 @@ export function MessageList({
);
}
// Sort messages by received_at ascending (oldest first)
// Note: Deduplication is handled by useConversationMessages.addMessageIfNew()
// and the database UNIQUE constraint on (type, conversation_key, text, sender_timestamp)
const sortedMessages = useMemo(
() => [...messages].sort((a, b) => a.received_at - b.received_at),
[messages]
);
// Helper to get a unique sender key for grouping messages
const getSenderKey = (msg: Message, sender: string | null): string => {
if (msg.outgoing) return '__outgoing__';