MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / isAddressedToAnotherUser

Function isAddressedToAnotherUser

server/src/addie/thread-utils.ts:73–76  ·  view source on GitHub ↗
(messageText: string, botUserId: string)

Source from the content-addressed store, hash-verified

71 * many humans are in the thread.
72 */
73export function isAddressedToAnotherUser(messageText: string, botUserId: string): boolean {
74 const match = /^<@(U[A-Z0-9]+)>/.exec(messageText.trim());
75 return !!(match && match[1] !== botUserId);
76}
77
78/**
79 * In a multi-party thread, determine whether a message is directed at Addie.

Callers 2

handleChannelMessageFunction · 0.85

Calls 1

trimMethod · 0.65

Tested by

no test coverage detected