Skip to content

Commit

Permalink
runfix: do not open a conversation with blocked user
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykBuniX committed Jan 12, 2024
1 parent c97e044 commit 1925336
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/script/view_model/ContentViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,9 @@ export class ContentViewModel {

try {
const conversationEntity = await this.getConversationEntity(conversation, domain);
const isConnectionBlocked = conversationEntity?.connection()?.isBlocked();

if (!conversationEntity) {
if (!conversationEntity || isConnectionBlocked) {
this.closeRightSidebar();
throw new ConversationError(
ConversationError.TYPE.CONVERSATION_NOT_FOUND,
Expand Down

0 comments on commit 1925336

Please sign in to comment.