Message menu
Users can open a context menu on messages in the channel message list (right-click or long-press). Visible items depend on message type and state.

Reference artwork. Channel filters and header menus are app-owned.
Built-in menu IDs
IDs are defined by MessageMenuID:
| ID | Description |
|---|---|
MessageMenuID.REPLY | Reply / quote |
MessageMenuID.MULIT_CHOICE | Multi-select mode |
MessageMenuID.COPY | Copy text (typically text messages) |
MessageMenuID.FORWARD | Forward |
MessageMenuID.SPEECH_TO_TEXT | Speech to text for HD voice messages when speech-to-text is enabled |
MessageMenuID.CANCEL_SPEECH_TO_TEXT | Cancel speech-to-text |
MessageMenuID.DELETE_FOR_ME | Delete the message from the current user's view |
MessageMenuID.DELETE_FOR_ALL | Delete a sent message for all participants within the configured recall window |
Labels resolve from i18n tables keyed by the menu id strings. See Localization.
Example: clone the built-in en_US strings, tweak a label, and register them under en_UK so the snippet shows both locales side by side:
import { MessageMenuID } from '@nexconn/chatui';
const entries = app.cloneLanguageEntries('en_US');
entries[MessageMenuID.REPLY] = 'Quote';
app.registerLanguagePack('en_UK', entries);
Delete and confirmation
Sensitive actions such as delete may show a confirmation dialog. The exact delete flow depends on message direction, the recall time window, and backend policy.

Customize the message menu
cloneMessageMenu returns a shallow copy of the MessageMenuItem array; call setMessageMenu with the updated array.
The built-in items follow these visibility rules:
DELETE_FOR_ME: shown for received messages, failed outgoing messages, and sent outgoing messages after the configured recall time window; hidden for sending messagesDELETE_FOR_ALL: sender-side only, hidden for sending/failed messages, and shown only within the configured recall time windowREPLY: shown for text, image, file, and reference messages that are not sending/failedCOPY: shown for text or reference messages whennavigator.clipboardis availableFORWARD: shown for text, image, file, HD voice, combine, GIF, short video, and reference messages that are not sending/failedSPEECH_TO_TEXT/CANCEL_SPEECH_TO_TEXT: shown only for HD voice messages when speech-to-text is enabled- In system channels,
REPLY,FORWARD, andMULIT_CHOICEare hidden.COPYandDELETE_FOR_MEcan still appear when their own filters match the message.
import type { MessageMenuItem } from '@nexconn/chatui';
const menu: MessageMenuItem[] = app.cloneMessageMenu();
menu.push({
id: 'message.menu.item.demo',
icon: 'https://example.com/icon.svg',
filter: () => true,
});
app.setMessageMenu(menu);
MessageMenuItem has id, icon, and optional filter(message).
Add i18n keys for new ids. Clicks on custom items emit ChatUIEvents MESSAGE_MENU_ITEM_CLICK with MessageMenuItemClick.
import { ChatUIEvents } from '@nexconn/chatui';
app.addEventListener(ChatUIEvents.MESSAGE_MENU_ITEM_CLICK, (evt) => {
const { id, message } = evt.data;
if (id === 'message.menu.item.demo') {
// Custom handling
return;
}
// Built-ins: avoid evt.preventDefault() unless you intentionally override SDK behavior
});