Skip to content

Latest commit

 

History

History
47 lines (39 loc) · 2.43 KB

File metadata and controls

47 lines (39 loc) · 2.43 KB

chats

Read when: listing known chats, filtering chat state, archiving/pinning/muting/marking chats, or pruning stale local chat rows.

wacli chats reads chat rows from wacli.db. It can use session-backed PN/LID mappings to make historical @lid chat rows display as phone-number chats when possible. State commands send WhatsApp app-state patches through the authenticated session and update the local index after WhatsApp accepts the change.

Commands

wacli chats list [--query TEXT] [--limit N] [--archived|--no-archived] [--pinned|--no-pinned] [--muted|--no-muted] [--unread|--no-unread]
wacli chats show --jid JID
wacli chats archive --chat CHAT [--pick N]
wacli chats unarchive --chat CHAT [--pick N]
wacli chats pin --chat CHAT [--pick N]
wacli chats unpin --chat CHAT [--pick N]
wacli chats mute --chat CHAT [--duration DURATION] [--pick N]
wacli chats unmute --chat CHAT [--pick N]
wacli chats mark-read --chat CHAT [--pick N]
wacli chats mark-unread --chat CHAT [--pick N]
wacli chats cleanup [--days N] [--jid JID] [--dry-run] [--confirm]

Notes

  • list is local and sorted by pinned chats first, then newest known message timestamp.
  • --query filters by chat name or JID.
  • list --json and show --json include archived, pinned, muted_until, and unread.
  • show accepts the stored JID. If a phone JID maps to a historical @lid row, it can show that row too.
  • State commands use --chat and resolve names, phone numbers, groups, and JIDs like send commands. Use --pick N for ambiguous matches.
  • State commands print a compact success line by default and a stable JSON object with --json.
  • mute --duration 0 or omitting --duration mutes forever. Use unmute to clear it.
  • Run wacli sync to catch up chat-state changes made on other devices; run wacli contacts refresh to improve chat names.
  • cleanup only deletes local wacli.db rows. It does not delete chats or messages from WhatsApp.
  • cleanup --days N skips chats with no known local activity timestamp; use --jid for an explicit local row.
  • Use cleanup --dry-run before deleting and --confirm only for scripts that already reviewed the target list.

Examples

wacli chats list
wacli chats list --query family --limit 20
wacli chats list --pinned
wacli chats show --jid [email protected]
wacli chats mute --chat "+1 555 123 4567" --duration 8h
wacli chats mark-read --chat family --pick 1
wacli chats cleanup --days 365 --dry-run