Skip to content

typing: 'any;-;' GUID prefix not recognized by IMCore #54

@jordanstern

Description

@jordanstern

Bug

imsg typing --chat-id <id> fails with:

typingIndicatorFailed("Chat not found for identifier: any;-;+14155551212. Make sure Messages.app has an active conversation with this contact.")

Root cause

The chat table in chat.db stores GUIDs with an any;-; prefix for some conversations:

SELECT ROWID, chat_identifier, guid, service_name FROM chat WHERE ROWID = 1;
-- 1|+14155551212|any;-;+14155551212|iMessage|

When --chat-id is used, ChatTargetResolver.resolveChatTarget resolves to a ResolvedChatTarget with GUID any;-;+14155551212. Then preferredIdentifier returns the GUID (preferred over identifier). This gets passed to TypingIndicator.lookupChat, which tries both existingChatWithGUID: and existingChatWithChatIdentifier: on IMCore's IMChatRegistry — but IMCore doesn't recognize the any;-; prefix. It expects iMessage;-; or SMS;-;.

Suggested fix

When the GUID has an any;-; prefix, rewrite it using the chat's service_name from the DB. For example:

  • any;-;+14155551212 + service iMessageiMessage;-;+14155551212
  • any;-;+14155551212 + service SMSSMS;-;+14155551212

Alternatively, TypingIndicator.lookupChat could try stripping any;-; and re-querying with iMessage;-; / SMS;-; as a fallback.

Workaround

Using --chat-identifier "iMessage;-;+14155551212" directly bypasses the GUID path but requires knowing the service type.

Version: 0.5.0 / macOS 15 (Sequoia)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions