[FIX] Error when normalizing empty messages (#1532)

This commit is contained in:
Diego Mello 2020-01-08 09:26:35 -03:00 committed by GitHub
parent 1096d50f76
commit 32bba0fc53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,9 @@ function normalizeAttachments(msg) {
}
export default (msg) => {
if (!msg) {
return null;
}
msg = normalizeAttachments(msg);
msg.reactions = msg.reactions || [];
msg.unread = msg.unread || false;