feat: add composerActions for chat rooms

This commit is contained in:
Barış Soner Uşaklı
2023-09-16 20:46:54 -04:00
parent f098db7fd3
commit d906097a22
3 changed files with 5 additions and 1 deletions

View File

@@ -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",

View File

@@ -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

View File

@@ -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;