filter out nuleld out messages

This commit is contained in:
Daniel Lugo 2020-11-18 15:05:31 -04:00
parent d24230ad7a
commit ddd052b5d4

View file

@ -491,12 +491,15 @@ const processChats = debounce(() => {
}
/** @type {ChatMessage[]} */
let msgs = Object.entries(out.messages).map(([mid, m]) => ({
id: mid,
outgoing: true,
body: m.body,
timestamp: m.timestamp
}))
let msgs = Object.entries(out.messages)
.map(([mid, m]) => ({
id: mid,
outgoing: true,
body: m.body,
timestamp: m.timestamp
}))
// filter out null messages
.filter(m => typeof m.body === 'string')
const incoming = pubToFeed[out.with]