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)
id: mid, .map(([mid, m]) => ({
outgoing: true, id: mid,
body: m.body, outgoing: true,
timestamp: m.timestamp body: m.body,
})) timestamp: m.timestamp
}))
// filter out null messages
.filter(m => typeof m.body === 'string')
const incoming = pubToFeed[out.with] const incoming = pubToFeed[out.with]