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[]} */ /** @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]