Owner account (ADMIN_EMAIL) has no link or source cap (Marty 2026-11-17: 'since I am the owner, I don't want a limit on my account'); members keep 100 links / 30 sources

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-17 09:17:52 -06:00
parent ae39e05fc5
commit bd5ed4e370
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ async function list(owner) {
inUse: Array.from(new Set(items.map(s => s.template).filter(k => k && k !== 'custom'))), keys: KEYS, events: postbacks.EVENTS, limits: LIMITS };
}
async function create(owner, body) {
if (mine(owner).length >= LIMITS.perAccount) return { error: 'Up to ' + LIMITS.perAccount + ' sources per account.' };
if (String(owner || '').trim().toLowerCase() !== String(process.env.ADMIN_EMAIL || '').trim().toLowerCase() && mine(owner).length >= LIMITS.perAccount) return { error: 'Up to ' + LIMITS.perAccount + ' sources per account.' }; // the owner's account has no source cap (Marty 2026-11-17)
const tplKey = String(body.template || 'custom').trim().toLowerCase(); const tpl = tplKey !== 'custom' ? template(tplKey) : null;
if (tplKey !== 'custom' && !tpl) return { error: 'No such network template.' };
const name = String(body.name || (tpl ? tpl.name : '')).trim().slice(0, LIMITS.name); if (!name) return { error: 'Give the source a name.' };