MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / targetFromCurrentChat

Function targetFromCurrentChat

cy/cy.ts:157–162  ·  view source on GitHub ↗
(msg: Api.Message)

Source from the content-addressed store, hash-verified

155 return String(item.value ?? item.id ?? "");
156}
157
158function targetFromCurrentChat(msg: Api.Message): string {
159 const chat: any = (msg as any).chat;
160 if (chat?.username) return `@${chat.username}`;
161 if ((msg as any).chatId) return String((msg as any).chatId);
162 return stablePeerPart((msg as any).peerId);
163}
164
165function messageText(msg: Api.Message): string {

Callers 1

CyPluginClass · 0.85

Calls 1

stablePeerPartFunction · 0.85

Tested by

no test coverage detected