Delete Message for Everyone
Nexconn Chat UI exposes deleting a message for everyone through ChatProvider.deleteMessageForAll. The default long-press menu shows this action only for sent messages that can be deleted for everyone by the current user and current SDK state.
Delete from the Default Menu
With the standard ChatPage, users can long-press a sent message and choose the delete-for-everyone action. On success, the message list is updated with the deleted-for-everyone placeholder returned by the SDK, or the original message is removed when the SDK does not return one.
Delete for Everyone in Custom UI
final error = await chatProvider.deleteMessageForAll(message);
if (error != null && !error.isSuccess) {
// Show your own error state.
}
Use deleteMessageForMe when your custom action should delete the message only for the current user.
Customize the Menu
Use ChatMessageLongPressMenuConfig to hide the built-in action or provide custom delete-for-everyone handling.
ChatPageConfig(
longPressMenuConfig: ChatMessageLongPressMenuConfig(
showDeleteForAllButton: true,
onDeleteForAll: (context, channel, message) async {
await context.read<ChatProvider>().deleteMessageForAll(message);
},
),
)
Delete-for-everyone permissions, time limits, and final remote behavior are enforced by the underlying Nexconn SDK and service configuration.