Fix admin authorization and harden chat requests
This commit is contained in:
@@ -129,6 +129,15 @@ export function createAttachmentComposer({onChange, onError}) {
|
||||
drafts.delete(chatId);
|
||||
render();
|
||||
},
|
||||
clearSentDraft(chatId, ids) {
|
||||
const saved = drafts.get(chatId) || [];
|
||||
const sent = new Set(ids);
|
||||
drafts.set(chatId, saved.filter(item => {
|
||||
if (!sent.has(item.metadata?.id)) return true;
|
||||
URL.revokeObjectURL(item.preview);
|
||||
return false;
|
||||
}));
|
||||
},
|
||||
discardDraft(chatId) {
|
||||
const saved = drafts.get(chatId) || [];
|
||||
drafts.delete(chatId);
|
||||
|
||||
Reference in New Issue
Block a user