exclude empty timestamp conversation from contacts list

This commit is contained in:
Audric Ackermann 2020-07-09 11:07:16 +10:00
parent c8241f47e6
commit adb7234b43
No known key found for this signature in database
GPG key ID: 999F434D76324AD4
2 changed files with 9 additions and 2 deletions

View file

@ -15,7 +15,12 @@
const convos = window.getConversations().models;
this.contacts = convos.filter(
d => !!d && !d.isBlocked() && d.isPrivate() && !d.isMe()
d =>
!!d &&
!d.isBlocked() &&
d.isPrivate() &&
!d.isMe() &&
!!d.attributes.timestamp
);
if (!convo.isPublic()) {
const members = convo.get('members') || [];

View file

@ -31,7 +31,9 @@ export class InviteContactsDialog extends React.Component<Props, State> {
contacts = contacts.map(d => {
const lokiProfile = d.getLokiProfile();
const name = lokiProfile ? lokiProfile.displayName : 'Anonymous';
const name = lokiProfile
? lokiProfile.displayName
: window.i18n('anonymous');
// TODO: should take existing members into account
const existingMember = false;