Merge branch 'unread-rooms-query' into chat-notifications

This commit is contained in:
Ulf Gebhardt 2023-07-17 11:49:51 +02:00
commit fb45ac107a
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
3 changed files with 9 additions and 2 deletions

View File

@ -374,7 +374,7 @@ describe('Room', () => {
).resolves.toMatchObject({ ).resolves.toMatchObject({
data: { data: {
UnreadRooms: 2, UnreadRooms: 2,
} },
}) })
}) })
}) })

View File

@ -254,6 +254,7 @@ export default {
const msgs = [] const msgs = []
;[...this.messages, ...Message].forEach((m) => { ;[...this.messages, ...Message].forEach((m) => {
m.date = new Date(m.date).toDateString()
msgs[m.indexId] = m msgs[m.indexId] = m
}) })
this.messages = msgs.filter(Boolean) this.messages = msgs.filter(Boolean)

View File

@ -7,11 +7,17 @@ export const messageQuery = () => {
_id _id
id id
indexId indexId
senderId
content content
senderId
author { author {
id id
} }
username
avatar
date
saved
distributed
seen
} }
} }
` `