always remove message from cache and return early when message.body is null

pull/150/head
sachaaaaa 6 years ago
parent adfb4ab371
commit fe63a9af8c

@ -954,11 +954,14 @@ MessageReceiver.prototype.extend({
if (conversation && !message.flags) {
const isFriendRequestAccept = await conversation.onFriendRequestAccepted();
if (isFriendRequestAccept) {
await conversation.notifyFriendRequest(envelope.source, 'accepted');
this.removeFromCache(envelope);
return null;
await conversation.notifyFriendRequest(
envelope.source,
'accepted'
);
}
}
this.removeFromCache(envelope);
return null;
}
const ev = new Event('message');

Loading…
Cancel
Save