Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

Mac: WhatsApp Status updates and channels no longer show as chats (#901)

Claudecbec7563cf84
diff --git a/NotchBuddy/Sources/App/WhatsAppModels.swift b/NotchBuddy/Sources/App/WhatsAppModels.swift
index 13a92120..e214c579 100644
--- a/NotchBuddy/Sources/App/WhatsAppModels.swift
+++ b/NotchBuddy/Sources/App/WhatsAppModels.swift
@@ -74,6 +74,10 @@ struct WAFilters: Equatable, Sendable {
enum WAJID {
static func isGroup(_ jid: String) -> Bool { jid.hasSuffix("@g.us") }
+ /// Status updates (status@broadcast), broadcast lists and channels (…@newsletter) come in as
+ /// messages too, but they are not conversations: a contact's Status would become a chat named after them (#901).
+ static func isConversation(_ jid: String) -> Bool { !jid.hasSuffix("@broadcast") && !jid.hasSuffix("@newsletter") }
+
/// "[email protected]" → "+33 6 12 34 56 78"-ish: the digits with a plus.
static func displayNumber(_ jid: String) -> String {
let user = jid.split(separator: "@").first.map(String.init) ?? jid
@@ -130,7 +134,7 @@ struct WAInbox: Equatable, Sendable {
mutating func add(_ message: WAMessage, filters: WAFilters, name: String? = nil, history: Bool = false) -> Outcome {
guard !seenIds.contains(message.id) else { return .duplicate }
let chat = WAJID.normalized(message.chat)
- guard !filters.ignored.contains(chat) else { return .ignored }
+ guard WAJID.isConversation(chat), !filters.ignored.contains(chat) else { return .ignored }
seenIds.insert(message.id)
seenOrder.append(message.id)
if seenOrder.count > 2_000 {
diff --git a/tests/WhatsAppTests.swift b/tests/WhatsAppTests.swift
index 32d82716..14919184 100644
--- a/tests/WhatsAppTests.swift
+++ b/tests/WhatsAppTests.swift
@@ -52,6 +52,16 @@ enum WhatsAppTests {
check("groups heard when not muted", inbox.add(msg("g3", chat: group, from: "[email protected]"), filters: f) == .notify)
}
+ print("\nStatus updates and channels are not conversations (#901)")
+ do {
+ var inbox = WAInbox()
+ let f = WAFilters()
+ check("a contact's Status is left out", inbox.add(msg("s1", chat: "status@broadcast", from: "[email protected]", text: "https://vm.tiktok.com/x"), filters: f) == .ignored)
+ check("a channel post is left out", inbox.add(msg("n1", chat: "120363000000000001@newsletter"), filters: f) == .ignored)
+ check("nothing shows", inbox.visible(filters: f).isEmpty)
+ check("people and groups still are", WAJID.isConversation("[email protected]") && WAJID.isConversation("[email protected]") && WAJID.isConversation("251556368777322@lid"))
+ }
+
print("\nOnly the last messages are kept")
do {
var inbox = WAInbox()