From 16ddb47466069a0654a29deb5182818b9b94fcc2 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 27 Oct 2015 10:44:41 +0000 Subject: [PATCH] Defer entirely to the end app for handling links --- src/controllers/pages/MatrixChat.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/controllers/pages/MatrixChat.js b/src/controllers/pages/MatrixChat.js index e56d835267..e1f6afb95e 100644 --- a/src/controllers/pages/MatrixChat.js +++ b/src/controllers/pages/MatrixChat.js @@ -70,10 +70,12 @@ module.exports = { // this can technically be done anywhere but doing this here keeps all // the routing url path logic together. - linkifyMatrix.onAliasClick = function(event, alias) { - dis.dispatch({action: 'view_room_alias', room_alias: alias}); - event.preventDefault(); - }; + if (this.onAliasClick) { + linkifyMatrix.onAliasClick = this.onAliasClick; + } + if (this.onUserClick) { + linkifyMatrix.onUserClick = this.onUserClick; + } }, componentWillUnmount: function() {