-
Notifications
You must be signed in to change notification settings - Fork 509
chore(pinia): migrate actor store to pinia #15307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
11aaac8 to
f0c690a
Compare
1c6fc2a to
51c4e0a
Compare
| && !this.isCurrentUserOwnMessage | ||
| && this.message.actorType === ATTENDEE.ACTOR_TYPE.USERS | ||
| && this.$store.getters.isActorUser() | ||
| && !this.isCurrentGuest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: need to unify that, we have a lot of different checks in different places for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also follow-up: we are checking it now based on actorType:
const isActorUser = computed(() => actorType.value === ATTENDEE.ACTOR_TYPE.USERS)
const isActorGuest = computed(() => actorType.value === ATTENDEE.ACTOR_TYPE.GUESTS)
Because we set one of these in setCurrentUser() or setCurrentParticipant(). But actorType can be also 'emails' | 'bridged' | 'federated_users' | 'phones'
Correct way (what we actually want to check) in most places is if user logged in: userId !== null, right?
Antreesy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works so far =)
src/components/MessagesList/MessagesGroup/Message/MessagePart/Reactions.vue
Show resolved
Hide resolved
| && !this.isCurrentUserOwnMessage | ||
| && this.message.actorType === ATTENDEE.ACTOR_TYPE.USERS | ||
| && this.$store.getters.isActorUser() | ||
| && !this.isCurrentGuest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also follow-up: we are checking it now based on actorType:
const isActorUser = computed(() => actorType.value === ATTENDEE.ACTOR_TYPE.USERS)
const isActorGuest = computed(() => actorType.value === ATTENDEE.ACTOR_TYPE.GUESTS)
Because we set one of these in setCurrentUser() or setCurrentParticipant(). But actorType can be also 'emails' | 'bridged' | 'federated_users' | 'phones'
Correct way (what we actually want to check) in most places is if user logged in: userId !== null, right?
Signed-off-by: Dorra Jaouad <[email protected]>
Signed-off-by: Dorra Jaouad <[email protected]>
Signed-off-by: Dorra Jaouad <[email protected]>
Signed-off-by: Dorra Jaouad <[email protected]>
920ba3a to
9e9d82b
Compare
Signed-off-by: Dorra Jaouad <[email protected]>
9e9d82b to
ba139c8
Compare
Antreesy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, minor comments
Signed-off-by: Dorra Jaouad <[email protected]>
8a299b0 to
0709f74
Compare
☑️ Resolves
🏁 Checklist