diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-01-13 19:02:28 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-01-13 19:02:28 +0300 |
commit | 7cd71736543d135c15dd574f93f2f8e2584c887c (patch) | |
tree | 777d18adf7996ce52092dff662c7fb42c960f29b /src/views | |
parent | 83c75400edb149c3c3e594647dbb5ab43f68664f (diff) |
Show unread 1-1 messages in dashboard widget
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/Dashboard.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 8bd498028..f55ca80c2 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -62,6 +62,7 @@ import ConversationIcon from './../components/ConversationIcon' import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent' import axios from '@nextcloud/axios' import { generateOcsUrl, generateUrl } from '@nextcloud/router' +import { CONVERSATION } from '../constants' const ROOM_POLLING_INTERVAL = 30 @@ -155,7 +156,9 @@ export default { axios.get(generateOcsUrl('apps/spreed/api/v2', 2) + 'room').then((response) => { const rooms = response.data.ocs.data const importantRooms = rooms.filter((conversation) => { - return conversation.hasCall || conversation.unreadMention + return conversation.hasCall + || conversation.unreadMention + || (conversation.unreadMessages > 0 && conversation.type === CONVERSATION.TYPE.ONE_TO_ONE) }) if (importantRooms.length) { |