diff --git a/apps/meteor/app/ui/client/views/app/lib/getCommonRoomEvents.js b/apps/meteor/app/ui/client/views/app/lib/getCommonRoomEvents.js index 3368fd91a4c1..a650f8c6f5a1 100644 --- a/apps/meteor/app/ui/client/views/app/lib/getCommonRoomEvents.js +++ b/apps/meteor/app/ui/client/views/app/lib/getCommonRoomEvents.js @@ -321,6 +321,7 @@ export const getCommonRoomEvents = () => ({ const messageContext = messageArgs(this); const { msg: message, u: user, context: ctx } = messageContext; const context = ctx || message.context || message.actionContext || 'message'; + const room = Rooms.findOne({ _id: template.data.rid }); const allItems = MessageAction.getButtons({ ...messageContext, message, user }, context, 'menu').map((item) => ({ icon: item.icon, @@ -328,6 +329,7 @@ export const getCommonRoomEvents = () => ({ type: 'message-action', id: item.id, modifier: item.color, + action: () => item.action(e, { tabbar: template.tabbar, message, room }), })); const itemsBelowDivider = ['delete-message', 'report-message'];