mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-03 22:14:14 -04:00
autohyperlink messages using linky
This commit is contained in:
parent
54c47f962b
commit
831c218a93
4 changed files with 581 additions and 3 deletions
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
angular.module('RoomController', [])
|
||||
angular.module('RoomController', ['ngSanitize'])
|
||||
|
||||
.controller('RoomController', ['$scope', '$http', '$timeout', '$routeParams', '$location', 'matrixService', 'eventStreamService', 'eventHandlerService',
|
||||
function($scope, $http, $timeout, $routeParams, $location, matrixService, eventStreamService, eventHandlerService) {
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
</td>
|
||||
<td ng-class="!msg.content.membership_target ? (msg.content.msgtype === 'm.emote' ? 'emote text' : 'text') : ''">
|
||||
<div class="bubble">
|
||||
{{ msg.content.msgtype === "m.emote" ? ("* " + (members[msg.user_id].displayname || msg.user_id) + " " + msg.content.body) : "" }}
|
||||
{{ msg.content.msgtype === "m.text" ? msg.content.body : "" }}
|
||||
<span ng-hide='msg.content.msgtype !== "m.emote"' ng-bind-html="'* ' + (members[msg.user_id].displayname || msg.user_id) + ' ' + msg.content.body | linky:'_blank'"/>
|
||||
<span ng-hide='msg.content.msgtype !== "m.text"' ng-bind-html="msg.content.body | linky:'_blank'"/>
|
||||
<img class="image" ng-hide='msg.content.msgtype !== "m.image"' ng-src="{{ msg.content.url }}" alt="{{ msg.content.body }}"/>
|
||||
</div>
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue