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

Method mutateDb

tmp_admin/tmp_admin.ts:753–764  ·  view source on GitHub ↗
(mutator: (data: TmpAdminDB) => void)

Source from the content-addressed store, hash-verified

751 if (!db.data.jobs) db.data.jobs = {};
752 mutator(db.data);
753 await db.write();
754 });
755 this.dbQueue = run.catch(() => {});
756 await run;
757 }
758
759 private async persistJob(key: string, job: TempAdminJob): Promise<void> {
760 const stored: StoredJob = {
761 chatKey: job.chatKey,
762 channel: serializeChannel(job.channel),
763 user: serializeUser(job.userEntity),
764 userId: job.userId,
765 userDisplay: job.userDisplay,
766 originalRank: job.originalRank,
767 replyToMsgId: job.replyToMsgId,

Callers 3

persistJobMethod · 0.95
deleteStoredJobMethod · 0.95
restoreJobsMethod · 0.95

Calls 2

getDbMethod · 0.95
writeMethod · 0.80

Tested by

no test coverage detected