summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-10-15 13:57:19 +0100
committerKegan Dougal <kegan@matrix.org>2014-10-15 13:57:19 +0100
commit07890b43ca739667b6974466739933ec2f2404e9 (patch)
treec7046fc302289a95190e9f467ea3ecb12f2075a9 /webclient
parentAdd support for org.matrix.custom.text.html (diff)
downloadsynapse-07890b43ca739667b6974466739933ec2f2404e9.tar.xz
Remove org.matrix.custom.text.html event type and replace it with 'format' and 'formatted_body' keys on m.text messages
Diffstat (limited to '')
-rw-r--r--webclient/components/matrix/event-handler-service.js1
-rw-r--r--webclient/room/room.html4
2 files changed, 2 insertions, 3 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index 495c24ef59..e990d42d05 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -460,7 +460,6 @@ 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 30277ab9fb..479b4c9a05 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -121,8 +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.type === 'm.room.message') ? (msg.content.body | linky:'_blank') : 
-                                             (msg.content.msgtype === 'm.text' && msg.type === 'org.matrix.custom.text.html') ? msg.content.body : '' "/>
+                              ng-bind-html="(msg.content.msgtype === 'm.text' && msg.type === 'm.room.message' && msg.content.format === 'org.matrix.custom.html') ? msg.content.formatted_body :
+                                             (msg.content.msgtype === 'm.text' && msg.type === 'm.room.message') ? (msg.content.body | linky:'_blank') : '' "/>
 
                         <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>