Unverified Commit b4e15753 authored by Diego Mello's avatar Diego Mello Committed by GitHub
Browse files

[FIX] Insert messages with blank users (#1529)

parent 62db1ec9
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment