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

Function ensureChannelId

shift/shift.ts:464–470  ·  view source on GitHub ↗
(id: any)

Source from the content-addressed store, hash-verified

462 return ensureChannelId(entityOrId.id);
463 }
464 const chatId = Number(extractIdString(entityOrId.id));
465 if (entityOrId.className === "Chat" && chatId > 0) {
466 return -chatId;
467 }
468 return chatId;
469 } else {
470 const rawId = extractIdString(entityOrId);
471 if (rawId.startsWith("-100")) return Number(rawId);
472 const chatId = Number(rawId);
473 if (chatId > 1000000000) {

Callers 2

normalizeChatIdFunction · 0.85
getChatIdFromMessageFunction · 0.85

Calls 1

extractIdStringFunction · 0.85

Tested by

no test coverage detected