Browse Source

Fix going by broken contact

master
morethanwords 3 years ago
parent
commit
037a604eef
  1. 4
      src/lib/appManagers/appImManager.ts

4
src/lib/appManagers/appImManager.ts

@ -1247,6 +1247,10 @@ export class AppImManager { @@ -1247,6 +1247,10 @@ export class AppImManager {
}
public setInnerPeer(peerId: PeerId, lastMsgId?: number, type: ChatType = 'chat', threadId?: number) {
if(peerId === NULL_PEER_ID || !peerId) {
return;
}
// * prevent opening already opened peer
const existingIndex = this.chats.findIndex(chat => chat.peerId === peerId && chat.type === type);
if(existingIndex !== -1) {

Loading…
Cancel
Save