summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-10-15 09:32:02 +0100
committerKegan Dougal <kegan@matrix.org>2014-10-15 09:32:02 +0100
commitf4667f86afe249be69ba5f2bbfe70a5a02f5b2f7 (patch)
treee24969455f6a49c075d858e0e31c54a7e4f46a23 /webclient
parentMake sure to return an empty JSON object ({}) from presence PUT/POST requests... (diff)
downloadsynapse-f4667f86afe249be69ba5f2bbfe70a5a02f5b2f7.tar.xz
Add support for org.matrix.custom.text.html
This format will remain undocumented as it is not yet suitable for
introduction into the specification.
Diffstat (limited to 'webclient')
-rw-r--r--webclient/components/matrix/event-handler-service.js1
-rw-r--r--webclient/room/room.html3
2 files changed, 3 insertions, 1 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index e990d42d05..495c24ef59 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -460,6 +460,7 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
                         handleRoomAliases(event, isLiveEvent);
                         break;
                     case "m.room.message":
+                    case "org.matrix.custom.text.html":
                         handleMessage(event, isLiveEvent);
                         break;
                     case "m.room.member":
diff --git a/webclient/room/room.html b/webclient/room/room.html
index b99413cbbf..30277ab9fb 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -121,7 +121,8 @@
                         <span ng-show='msg.content.msgtype === "m.text"' 
                               class="message"
                               ng-class="containsBingWord(msg.content.body) && msg.user_id != state.user_id ? msg.echo_msg_state + ' messageBing' : msg.echo_msg_state"
-                              ng-bind-html="((msg.content.msgtype === 'm.text') ? msg.content.body : '') | linky:'_blank'"/>
+                              ng-bind-html="(msg.content.msgtype === 'm.text' && msg.type === 'm.room.message') ? (msg.content.body | linky:'_blank') : 
+                                             (msg.content.msgtype === 'm.text' && msg.type === 'org.matrix.custom.text.html') ? msg.content.body : '' "/>
 
                         <span ng-show='msg.type === "m.call.invite" && msg.user_id == state.user_id'>Outgoing Call{{ isWebRTCSupported ? '' : ' (But your browser does not support VoIP)' }}</span>
                         <span ng-show='msg.type === "m.call.invite" && msg.user_id != state.user_id'>Incoming Call{{ isWebRTCSupported ? '' : ' (But your browser does not support VoIP)' }}</span>