mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 02:27:22 +02:00
fix tests
This commit is contained in:
@@ -37,9 +37,9 @@ MessageObject:
|
||||
roomId:
|
||||
type: number
|
||||
deleted:
|
||||
type: boolean
|
||||
type: number
|
||||
system:
|
||||
type: boolean
|
||||
type: number
|
||||
edited:
|
||||
type: number
|
||||
timestampISO:
|
||||
|
||||
@@ -59,9 +59,9 @@ get:
|
||||
roomId:
|
||||
type: string
|
||||
deleted:
|
||||
type: boolean
|
||||
type: number
|
||||
system:
|
||||
type: boolean
|
||||
type: number
|
||||
edited:
|
||||
type: number
|
||||
timestampISO:
|
||||
|
||||
@@ -67,6 +67,7 @@ module.exports = function (Messaging) {
|
||||
Messaging.addMessageToRoom(roomId, mid, timestamp),
|
||||
Messaging.markRead(uid, roomId),
|
||||
db.sortedSetAdd('messages:mid', timestamp, mid),
|
||||
db.incrObjectField('global', 'messageCount'),
|
||||
];
|
||||
if (roomData.public) {
|
||||
tasks.push(
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
const db = require('../../database');
|
||||
const batch = require('../../batch');
|
||||
|
||||
|
||||
module.exports = {
|
||||
name: 'Set mid on message objects and create messages:mid',
|
||||
timestamp: Date.UTC(2023, 6, 27),
|
||||
@@ -41,5 +40,7 @@ module.exports = {
|
||||
}, {
|
||||
batch: 500,
|
||||
});
|
||||
const count = await db.sortedSetCard(`messages:mid`);
|
||||
await db.setObjectField('global', 'messageCount', count);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user