diff options
author | Dorra <dorra.jaoued7@gmail.com> | 2024-07-04 14:23:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-04 14:23:33 +0200 |
commit | 5f3b216a5828efa992b4761ca66e24840c314e91 (patch) | |
tree | de2281ba31c6e30ad684bce21024755a941d6baa | |
parent | 64bacb06767012c7aa7009ab2f0ff6b75da3b780 (diff) | |
parent | c848b7c78f62eb0b041800cd40f113dae9f722a1 (diff) |
Merge pull request #12640 from nextcloud/fix/grouped-system-messages
fix(MessagesSystemGroup): separate messages with different actors
-rw-r--r-- | src/components/MessagesList/MessagesGroup/MessagesSystemGroup.vue | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/components/MessagesList/MessagesGroup/MessagesSystemGroup.vue b/src/components/MessagesList/MessagesGroup/MessagesSystemGroup.vue index f4f69c1ac..120444211 100644 --- a/src/components/MessagesList/MessagesGroup/MessagesSystemGroup.vue +++ b/src/components/MessagesList/MessagesGroup/MessagesSystemGroup.vue @@ -133,28 +133,27 @@ export default { return '' // No previous message } + if (message1.actorId !== message2.actorId + || message1.actorType !== message2.actorType) { + return '' // Different actors + } + // Group users added by one actor if (message1.systemMessage === 'user_added' - && message1.systemMessage === message2.systemMessage - && message1.actorId === message2.actorId - && message1.actorType === message2.actorType) { + && message1.systemMessage === message2.systemMessage) { return 'user_added' } // Group users removed by one actor if (message1.systemMessage === 'user_removed' - && message1.systemMessage === message2.systemMessage - && message1.actorId === message2.actorId - && message1.actorType === message2.actorType) { + && message1.systemMessage === message2.systemMessage) { return 'user_removed' } // Group users reconnected in a minute if (message1.systemMessage === 'call_joined' && message2.systemMessage === 'call_left' - && message1.timestamp - message2.timestamp < 60 * 1000 - && message1.actorId === message2.actorId - && message1.actorType === message2.actorType) { + && message1.timestamp - message2.timestamp < 60 * 1000) { return 'call_reconnected' } |