Skip to content

Node.js based forum software built for the modern web

fix: #7629, new filter hook for room rename

Barış Soner Uşaklı7ba4a864fd45
diff --git a/src/messaging/rooms.js b/src/messaging/rooms.js
index 7e16db352b..50084dd314 100644
--- a/src/messaging/rooms.js
+++ b/src/messaging/rooms.js
@@ -250,6 +250,13 @@ module.exports = function (Messaging) {
}
async.waterfall([
function (next) {
+ plugins.fireHook('filter:chat.renameRoom', {
+ uid: uid,
+ roomId: roomId,
+ newName: newName,
+ }, next);
+ },
+ function (result, next) {
Messaging.isRoomOwner(uid, roomId, next);
},
function (isOwner, next) {