mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
lint
This commit is contained in:
parent
961a260044
commit
41cca4f4ec
@ -238,15 +238,17 @@ export default {
|
|||||||
fetchPolicy: 'no-cache',
|
fetchPolicy: 'no-cache',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const rms = []
|
const rms = []
|
||||||
const rmsIds = []
|
const rmsIds = []
|
||||||
;[...Room, ...this.rooms].forEach((r) => {
|
;[...Room, ...this.rooms].forEach((r) => {
|
||||||
if (!rmsIds.find((v) => v === r.id)) {
|
if (!rmsIds.find((v) => v === r.id)) {
|
||||||
rms.push({...r, index: r.lastMessage.date,
|
rms.push({
|
||||||
|
...r,
|
||||||
|
index: r.lastMessage.date,
|
||||||
users: r.users.map((u) => {
|
users: r.users.map((u) => {
|
||||||
return { ...u, username: u.name, avatar: u.avatar?.url }
|
return { ...u, username: u.name, avatar: u.avatar?.url }
|
||||||
})})
|
}),
|
||||||
|
})
|
||||||
rmsIds.push(r.id)
|
rmsIds.push(r.id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -285,7 +287,9 @@ export default {
|
|||||||
fetchPolicy: 'no-cache',
|
fetchPolicy: 'no-cache',
|
||||||
})
|
})
|
||||||
|
|
||||||
const newMsgIds = Message.filter((m) => m.seen === false && m.senderId !== this.currentUser.id).map((m) => m.id)
|
const newMsgIds = Message.filter(
|
||||||
|
(m) => m.seen === false && m.senderId !== this.currentUser.id,
|
||||||
|
).map((m) => m.id)
|
||||||
if (newMsgIds.length) {
|
if (newMsgIds.length) {
|
||||||
const roomIndex = this.rooms.findIndex((r) => r.id === room.id)
|
const roomIndex = this.rooms.findIndex((r) => r.id === room.id)
|
||||||
const changedRoom = { ...this.rooms[roomIndex] }
|
const changedRoom = { ...this.rooms[roomIndex] }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user