From 45a5b888248de651f7cebd96882a9ce81f6039f8 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Sun, 26 Jan 2014 16:50:59 -0500 Subject: [PATCH] added filter:messaging.parse hook --- src/messaging.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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); + }); }); };