Skip to content

Commit

Permalink
fix(call): disable call feature when user is offline
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexZakablukov committed Jun 8, 2022
1 parent 8bd4458 commit 3a35757
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/views/navigation/toolbar/Toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ export default Vue.extend({
members?.includes(friend.address) && friend.state === 'online',
)
}
return this.friends.all.some((friend) => friend.state === 'online')
// Check current recipient is on the user's friends list
const friend = this.friends.all.find(
(f) => f.address === this.recipient.address,
)
return friend?.state === 'online'
},
ModalWindows: () => ModalWindows,
src(): string {
Expand Down

0 comments on commit 3a35757

Please sign in to comment.