Merge commit '4ba7633897eebc0e635ba8d5d648655175f75916' into v3.x

isekai-main
Misty Release Bot 1 year ago
commit 9b0d07ff9d

@ -1,3 +1,33 @@
#### v3.3.7 (2023-08-23)
##### Chores
* incrementing version number - v3.3.6 (7fb38792)
* update changelog for v3.3.6 (a43354c0)
* incrementing version number - v3.3.4 (a67f84ea)
* incrementing version number - v3.3.3 (f94d239b)
* incrementing version number - v3.3.2 (ec9dac97)
* incrementing version number - v3.3.1 (151cc68f)
* incrementing version number - v3.3.0 (fc1ad70f)
* incrementing version number - v3.2.3 (b06d3e63)
* incrementing version number - v3.2.2 (758ecfcd)
* incrementing version number - v3.2.1 (20145074)
* incrementing version number - v3.2.0 (9ecac38e)
* incrementing version number - v3.1.7 (0b4e81ab)
* incrementing version number - v3.1.6 (b3a3b130)
* incrementing version number - v3.1.5 (ec19343a)
* incrementing version number - v3.1.4 (2452783c)
* incrementing version number - v3.1.3 (3b4e9d3f)
* incrementing version number - v3.1.2 (40fa3489)
* incrementing version number - v3.1.1 (40250733)
* incrementing version number - v3.1.0 (0cb386bd)
* incrementing version number - v3.0.1 (26f6ea49)
* incrementing version number - v3.0.0 (224e08cd)
##### Bug Fixes
* closes #11945, fix skins loading if there are no custom skins (438c4c89)
#### v3.3.6 (2023-08-22)
##### Chores

@ -40,22 +40,27 @@ module.exports = {
const { roomId } = roomData;
const uids = await db.getSortedSetRange(`chat:room:${roomId}:uids`, 0, -1);
for (const uid of uids) {
await batch.processSortedSet(`uid:${uid}:chat:room:${roomId}:mids`, async (mids) => {
const uniqMids = mids.filter(mid => !midsSeen.hasOwnProperty(mid));
await batch.processSortedSet(`uid:${uid}:chat:room:${roomId}:mids`, async (userMessageData) => {
const uniqMessages = userMessageData.filter(m => !midsSeen.hasOwnProperty(m.value));
const uniqMids = uniqMessages.map(m => m.value);
if (!uniqMids.length) {
return;
}
let messageData = await db.getObjects(uniqMids.map(mid => `message:${mid}`));
messageData.forEach((m, idx) => {
if (m) {
if (m && uniqMessages[idx]) {
m.mid = parseInt(uniqMids[idx], 10);
m.timestamp = m.timestamp || uniqMessages[idx].score || 0;
}
});
messageData = messageData.filter(Boolean);
const bulkSet = messageData.map(
msg => [`message:${msg.mid}`, { roomId: roomId }]
msg => [`message:${msg.mid}`, {
roomId: roomId,
timestamp: msg.timestamp,
}]
);
await db.setObjectBulk(bulkSet);
@ -69,6 +74,7 @@ module.exports = {
});
}, {
batch: 500,
withScores: true,
});
// eslint-disable-next-line no-await-in-loop
await db.deleteAll(`uid:${uid}:chat:room:${roomId}:mids`);

Loading…
Cancel
Save