The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/action-links/server/actionLinkHandler.js

18 lines
533 B

import { Meteor } from 'meteor/meteor';
import { actionLinks } from './lib/actionLinks';
// Action Links Handler. This method will be called off the client.
Meteor.methods({
actionLinkHandler(name, messageId) {
if (!Meteor.userId()) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'actionLinkHandler' });
}
const message = actionLinks.getMessage(name, messageId);
const actionLink = message.actionLinks[name];
actionLinks.actions[actionLink.method_id](message, actionLink.params);
},
});