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

Method getUserConfig

save/save.ts:434–444  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

432 for (const pattern of patterns) {
433 const match = cleanLink.match(pattern);
434 if (match) {
435 let chatId = match[1];
436 const messageId = parseInt(match[2]);
437
438 if (/^-?\d+$/.test(chatId) && !chatId.startsWith('-100') && chatId.startsWith('-')) {
439 chatId = `-100${chatId.substring(1)}`;
440 } else if (/^\d+$/.test(chatId) && parseInt(chatId) > 0) {
441 chatId = `-100${chatId}`;
442 }
443
444 return { chatId, messageId };
445 }
446 }
447

Callers 1

handleCommandMethod · 0.95

Calls 2

initDBMethod · 0.95
writeMethod · 0.80

Tested by

no test coverage detected