mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: add missing await
This commit is contained in:
@@ -20,10 +20,7 @@ module.exports = function (Messaging) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Messaging.getRoomsData = async (roomIds) => {
|
Messaging.getRoomsData = async (roomIds) => {
|
||||||
const roomData = await db.getObjects(roomIds.map(function (roomId) {
|
const roomData = await db.getObjects(roomIds.map(roomId => 'chat:room:' + roomId));
|
||||||
return 'chat:room:' + roomId;
|
|
||||||
}));
|
|
||||||
|
|
||||||
modifyRoomData(roomData);
|
modifyRoomData(roomData);
|
||||||
return roomData;
|
return roomData;
|
||||||
};
|
};
|
||||||
@@ -193,7 +190,7 @@ module.exports = function (Messaging) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Messaging.canReply = async (roomId, uid) => {
|
Messaging.canReply = async (roomId, uid) => {
|
||||||
const inRoom = db.isSortedSetMember('chat:room:' + roomId + ':uids', uid);
|
const inRoom = await db.isSortedSetMember('chat:room:' + roomId + ':uids', uid);
|
||||||
const data = await plugins.fireHook('filter:messaging.canReply', { uid: uid, roomId: roomId, inRoom: inRoom, canReply: inRoom });
|
const data = await plugins.fireHook('filter:messaging.canReply', { uid: uid, roomId: roomId, inRoom: inRoom, canReply: inRoom });
|
||||||
return data.canReply;
|
return data.canReply;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user