filter out nuleld out messages
This commit is contained in:
parent
d24230ad7a
commit
ddd052b5d4
1 changed files with 9 additions and 6 deletions
|
|
@ -491,12 +491,15 @@ const processChats = debounce(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @type {ChatMessage[]} */
|
/** @type {ChatMessage[]} */
|
||||||
let msgs = Object.entries(out.messages).map(([mid, m]) => ({
|
let msgs = Object.entries(out.messages)
|
||||||
|
.map(([mid, m]) => ({
|
||||||
id: mid,
|
id: mid,
|
||||||
outgoing: true,
|
outgoing: true,
|
||||||
body: m.body,
|
body: m.body,
|
||||||
timestamp: m.timestamp
|
timestamp: m.timestamp
|
||||||
}))
|
}))
|
||||||
|
// filter out null messages
|
||||||
|
.filter(m => typeof m.body === 'string')
|
||||||
|
|
||||||
const incoming = pubToFeed[out.with]
|
const incoming = pubToFeed[out.with]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue