From 56bb2ed7920eded8a7877e588e75f008acd40626 Mon Sep 17 00:00:00 2001 From: Maxim Shishmarev Date: Mon, 25 Nov 2019 10:06:08 +1100 Subject: [PATCH] Address review comments --- js/models/messages.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/js/models/messages.js b/js/models/messages.js index 4e558816f..a63aa42f4 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -449,12 +449,9 @@ getPropsForGroupInvitation() { const invitation = this.get('group_invitation'); - let direction = 'incoming'; - - if (this.get('direction')) { - direction = this.get('direction'); - } else if (this.get('type') === 'outgoing') { - direction = 'outgoing'; + let direction = this.get('direction'); + if (!direction) { + direction = this.get('type') === 'outgoing' ? 'outgoing' : 'incoming'; } return {