mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Add fetchRooms option & check null on content.
This commit is contained in:
parent
b881daef91
commit
6659238fa1
@ -261,7 +261,7 @@ export default {
|
||||
index: r.lastMessage?.date,
|
||||
lastMessage: {
|
||||
...r.lastMessage,
|
||||
content: r.lastMessage?.content.trim().substring(0, 30),
|
||||
content: r.lastMessage?.content?.trim().substring(0, 30),
|
||||
},
|
||||
users: r.users.map((u) => {
|
||||
return { ...u, username: u.name, avatar: u.avatar?.url }
|
||||
@ -415,7 +415,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then(({ data: { CreateRoom } }) => {
|
||||
this.fetchRooms({ room: CreateRoom })
|
||||
this.fetchRooms({ room: CreateRoom, options: { refetch: true } })
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$toast.error(error)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user