0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-02 12:48:57 +01:00

Display ban & kick reason

This commit is contained in:
Emmanuel ROHEE 2014-09-05 16:45:59 +02:00
parent 4b7a5b7bfa
commit dcf0a6fbfd
2 changed files with 14 additions and 1 deletions

View file

@ -34,11 +34,17 @@
{{ {"join": "kicked", "ban": "unbanned"}[room.lastMsg.content.prev] }} {{ {"join": "kicked", "ban": "unbanned"}[room.lastMsg.content.prev] }}
{{ room.lastMsg.state_key | mUserDisplayName: room.room_id }} {{ room.lastMsg.state_key | mUserDisplayName: room.room_id }}
</span> </span>
<span ng-if="'join' === room.lastMsg.content.prev && room.lastMsg.content.reason">
: {{ room.lastMsg.content.reason }}
</span>
</span> </span>
<span ng-if="'invite' === room.lastMsg.content.membership || 'ban' === room.lastMsg.content.membership"> <span ng-if="'invite' === room.lastMsg.content.membership || 'ban' === room.lastMsg.content.membership">
{{ room.lastMsg.user_id | mUserDisplayName: room.room_id }} {{ room.lastMsg.user_id | mUserDisplayName: room.room_id }}
{{ {"invite": "invited", "ban": "banned"}[room.lastMsg.content.membership] }} {{ {"invite": "invited", "ban": "banned"}[room.lastMsg.content.membership] }}
{{ room.lastMsg.state_key | mUserDisplayName: room.room_id }} {{ room.lastMsg.state_key | mUserDisplayName: room.room_id }}
<span ng-if="'ban' === room.lastMsg.content.prev && room.lastMsg.content.reason">
: {{ room.lastMsg.content.reason }}
</span>
</span> </span>
</div> </div>

View file

@ -62,13 +62,20 @@
{{ members[msg.user_id].displayname || msg.user_id }} {{ members[msg.user_id].displayname || msg.user_id }}
{{ {"join": "kicked", "ban": "unbanned"}[msg.content.prev] }} {{ {"join": "kicked", "ban": "unbanned"}[msg.content.prev] }}
{{ members[msg.state_key].displayname || msg.state_key }} {{ members[msg.state_key].displayname || msg.state_key }}
<span ng-if="'join' === msg.content.prev && msg.content.reason">
: {{ msg.content.reason }}
</span>
</span> </span>
</span> </span>
<span ng-if="'invite' === msg.content.membership || 'ban' === msg.content.membership"> <span ng-if="'invite' === msg.content.membership || 'ban' === msg.content.membership">
{{ members[msg.user_id].displayname || msg.user_id }} {{ members[msg.user_id].displayname || msg.user_id }}
{{ {"invite": "invited", "ban": "banned"}[msg.content.membership] }} {{ {"invite": "invited", "ban": "banned"}[msg.content.membership] }}
{{ members[msg.state_key].displayname || msg.state_key }} {{ members[msg.state_key].displayname || msg.state_key }}
<span ng-if="'ban' === msg.content.prev && msg.content.reason">
: {{ msg.content.reason }}
</span> </span>
</span>
<span ng-show='msg.content.msgtype === "m.emote"' ng-bind-html="'* ' + (members[msg.user_id].displayname || msg.user_id) + ' ' + msg.content.body | linky:'_blank'"/> <span ng-show='msg.content.msgtype === "m.emote"' ng-bind-html="'* ' + (members[msg.user_id].displayname || msg.user_id) + ' ' + msg.content.body | linky:'_blank'"/>
<span ng-show='msg.content.msgtype === "m.text"' <span ng-show='msg.content.msgtype === "m.text"'
ng-class="msg.echo_msg_state" ng-class="msg.echo_msg_state"