Use base64 strings for incoming message cache instead of binary
This commit is contained in:
parent
9eefc0c29b
commit
7983300f4a
7 changed files with 62 additions and 28 deletions
|
@ -59,7 +59,6 @@ module.exports = {
|
|||
getUnprocessedById,
|
||||
saveUnprocessed,
|
||||
saveUnprocesseds,
|
||||
updateUnprocessed,
|
||||
removeUnprocessed,
|
||||
removeAllUnprocessed,
|
||||
|
||||
|
@ -374,19 +373,6 @@ async function saveUnprocesseds(arrayOfUnprocessed, { forceSave } = {}) {
|
|||
});
|
||||
}
|
||||
|
||||
async function updateUnprocessed(id, updates) {
|
||||
const existing = await channels.getUnprocessedById(id);
|
||||
if (!existing) {
|
||||
throw new Error(`Unprocessed id ${id} does not exist in the database!`);
|
||||
}
|
||||
const toSave = {
|
||||
...existing,
|
||||
...updates,
|
||||
};
|
||||
|
||||
await saveUnprocessed(toSave);
|
||||
}
|
||||
|
||||
async function removeUnprocessed(id) {
|
||||
await channels.removeUnprocessed(id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue