mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-10 02:32:56 +02:00
feat: Add direct messages (DM) support
- Parse PRIV (incoming) and SENT_MSG (outgoing) message types - Add DM API endpoints: conversations, messages, updates - Implement conversation grouping by pubkey_prefix or name - Add timeout-based delivery status (pending → timeout) - Add DM modal with conversation list and thread views - Add dual notification badge (blue=channels, green=DM) - Add DM button next to Reply on channel messages - Include message deduplication for both incoming and outgoing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -300,3 +300,30 @@ def floodadv() -> Tuple[bool, str]:
|
||||
"""
|
||||
success, stdout, stderr = _run_command(['floodadv'])
|
||||
return success, stdout or stderr
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Direct Messages (DM)
|
||||
# =============================================================================
|
||||
|
||||
def send_dm(recipient: str, text: str) -> Tuple[bool, str]:
|
||||
"""
|
||||
Send a direct/private message to a contact.
|
||||
|
||||
Uses meshcli 'msg' command: msg <name> <message>
|
||||
|
||||
Args:
|
||||
recipient: Contact name to send to
|
||||
text: Message content
|
||||
|
||||
Returns:
|
||||
Tuple of (success, message)
|
||||
"""
|
||||
if not recipient or not recipient.strip():
|
||||
return False, "Recipient name is required"
|
||||
|
||||
if not text or not text.strip():
|
||||
return False, "Message text is required"
|
||||
|
||||
success, stdout, stderr = _run_command(['msg', recipient.strip(), text.strip()])
|
||||
return success, stdout or stderr
|
||||
|
||||
Reference in New Issue
Block a user