diff --git a/src/messaging.js b/src/messaging.js index af3b8a1183..152c12c063 100644 --- a/src/messaging.js +++ b/src/messaging.js @@ -97,7 +97,19 @@ var db = require('./database'), username = ' ' + toUserData.username + ': '; } - callback(picture + username + parsed); + var messageData = { + message: message, + parsed: parsed, + fromuid: fromuid, + myuid: myuid, + toUserData: toUserData, + myUserData: myUserData, + parsedMessage: picture + username + parsed + }; + + plugins.fireHook('filter:messaging.parse', messageData, function(err, messageData) { + callback(messageData.parsedMessage); + }); }); };