filter out already members in invite dialog for closed groups

pull/1074/head
Audric Ackermann 5 years ago
parent 47397c636f
commit 28597e3539
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -14,11 +14,16 @@
const convos = window.getConversations().models;
const friends = convos.filter(
d => !!d && d.isFriend() && d.isPrivate() && !d.isMe()
);
if(convo.isPublic){
this.friends = convos.filter(
d => !!d && d.isFriend() && d.isPrivate() && !d.isMe()
);
} else {
this.friends = convos.filter(
d => !!d && d.isFriend() && d.isPrivate() && !d.isMe() && !convo.get('members').includes(d.id)
);
}
this.friends = friends;
this.chatName = convo.get('name');
this.chatServer = convo.get('server');
this.channelId = convo.get('channelId');

Loading…
Cancel
Save