Skip to content

Node.js based forum software built for the modern web

feat: add composerActions for chat rooms

Barış Soner Uşaklıd906097a22f3
diff --git a/install/package.json b/install/package.json
index 189aed4414..b8e13b90f6 100644
--- a/install/package.json
+++ b/install/package.json
@@ -95,7 +95,7 @@
"nodebb-plugin-2factor": "7.2.2",
"nodebb-plugin-composer-default": "10.2.23",
"nodebb-plugin-dbsearch": "6.2.2",
- "nodebb-plugin-emoji": "5.1.5",
+ "nodebb-plugin-emoji": "5.1.6",
"nodebb-plugin-emoji-android": "4.0.0",
"nodebb-plugin-markdown": "12.2.4",
"nodebb-plugin-mentions": "4.3.5",
diff --git a/public/openapi/read/user/userslug/chats/roomid.yaml b/public/openapi/read/user/userslug/chats/roomid.yaml
index cb350aa2e0..24bd0cb90b 100644
--- a/public/openapi/read/user/userslug/chats/roomid.yaml
+++ b/public/openapi/read/user/userslug/chats/roomid.yaml
@@ -496,4 +496,7 @@ get:
type: string
bodyClasses:
type: array
+ composerActions:
+ type: array
+ description: A list of buttons that are added next to the send message button by plugins
- $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps
\ No newline at end of file
diff --git a/src/messaging/rooms.js b/src/messaging/rooms.js
index c78be73671..a1312bf3a8 100644
--- a/src/messaging/rooms.js
+++ b/src/messaging/rooms.js
@@ -534,6 +534,7 @@ module.exports = function (Messaging) {
room.isAdmin = isAdmin;
room.notificationOptions = notifOptions.options;
room.notificationOptionsIcon = notifOptions.selectedIcon;
+ room.composerActions = [];
const payload = await plugins.hooks.fire('filter:messaging.loadRoom', { uid, data, room });
return payload.room;