[FIX] Insert messages with blank users (#1529)
This commit is contained in:
parent
62db1ec950
commit
b4e15753aa
|
@ -18,12 +18,6 @@ function normalizeAttachments(msg) {
|
|||
}
|
||||
|
||||
export default (msg) => {
|
||||
/**
|
||||
* 2019-03-29: Realm object properties are *always* optional, but `u.username` is required
|
||||
* https://realm.io/docs/javascript/latest/#to-one-relationships
|
||||
*/
|
||||
if (!msg || !msg.u || !msg.u.username) { return; }
|
||||
|
||||
msg = normalizeAttachments(msg);
|
||||
msg.reactions = msg.reactions || [];
|
||||
msg.unread = msg.unread || false;
|
||||
|
|
Loading…
Reference in New Issue