export type AllowFromMatch = AllowlistMatch<"wildcard" | "id">;
const warnedInvalidEntries = new Set<string>(); const log = createSubsystemLogger("telegram/bot-access");
function warnInvalidAllowFromEntries(entries: string[]) { if (process.env.VITEST || process.env.NODE_ENV === "test") { return;
} for (const entry of entries) { if (warnedInvalidEntries.has(entry)) { continue;
}
warnedInvalidEntries.add(entry);
log.warn(
[ "Invalid allowFrom entry:",
JSON.stringify(entry), "- allowFrom/groupAllowFrom authorization expects numeric Telegram sender user IDs only.", 'To allow a Telegram group or supergroup, add its negative chat ID under "channels.telegram.groups" instead.', 'If you had "@username" entries, re-run setup (it resolves @username to IDs) or replace them manually.',
].join(" "),
);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.