diff --git a/src/components/event.vue b/src/components/event.vue index aa45258..3f9d8a2 100644 --- a/src/components/event.vue +++ b/src/components/event.vue @@ -5,9 +5,9 @@
{{getTime(event.origin_server_ts)}}
-
+
{{membershipEvents[event.content.membership](event)}} - unsupported event + unsupported event: {{event.type}} {{getTime(event.origin_server_ts)}}
@@ -49,10 +49,12 @@ export default { return{ replyEvent: undefined, membershipEvents:{ - invite(event){ return `invited ${calcUserName(event.target.userId)}` }, + invite(event){ return `invited ${event.target?calcUserName(event.target.userId):event.content.displayname||event.state_key}` }, join(event){ - if (event.content.displayname !== null) return `changed username to ${event.content.displayname}` - return 'joined the room' + if (!event.unsigned.prev_content) return 'joined the room'; + if (event.unsigned.prev_content.displayName !== event.content.displayname) + return `changed displayname from ${event.unsigned.prev_content.displayname} to ${event.content.displayname}`; + return 'updated their account'; }, leave(){ return 'left the room' }, ban(event){return `banned ${calcUserName(event.target.userId)}` } @@ -79,6 +81,9 @@ export default { font-size: 0.7rem; } } + .info.send{ + text-align: right; + } .message{ position: relative; width: max-content; diff --git a/src/components/eventContent.vue b/src/components/eventContent.vue index cebebda..0330528 100644 --- a/src/components/eventContent.vue +++ b/src/components/eventContent.vue @@ -36,7 +36,8 @@
{{content.body}} -
unsupported message type {{content.msgtype}}
+
unsupported message type: {{content.msgtype}}
+
deleted message