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

Function getTargetLookup

bs/bs.ts:393–403  ·  view source on GitHub ↗
(target: TargetRecord)

Source from the content-addressed store, hash-verified

391}
392
393function getTargetLookup(target: TargetRecord): any {
394 if (target.chatId) {
395 const num = Number(target.chatId);
396 if (Number.isFinite(num)) return num;
397 try {
398 return BigInt(target.chatId);
399 } catch {}
400 return target.chatId;
401 }
402 return target.target;
403}
404
405function getRpcErrorMessage(error: any): string {
406 if (!error) return "";

Callers 1

forwardToTargetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected