diff options
-rw-r--r-- | src/components/AvatarWrapper/AvatarWrapper.vue | 5 | ||||
-rw-r--r-- | src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.vue | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/components/AvatarWrapper/AvatarWrapper.vue b/src/components/AvatarWrapper/AvatarWrapper.vue index f6dad0537..89d0c9f98 100644 --- a/src/components/AvatarWrapper/AvatarWrapper.vue +++ b/src/components/AvatarWrapper/AvatarWrapper.vue @@ -34,6 +34,7 @@ :disable-menu="disableMenu" :show-user-status="showUserStatus" :show-user-status-compact="showUserStatusCompact" + :preloaded-user-status="preloadedUserStatus" :size="size" /> <div v-else class="guest" @@ -92,6 +93,10 @@ export default { type: Boolean, default: true, }, + preloadedUserStatus: { + type: Object, + default: undefined, + }, }, computed: { // Determines which icon is displayed diff --git a/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.vue b/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.vue index e8ff85bb0..645559a72 100644 --- a/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.vue +++ b/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.vue @@ -40,6 +40,7 @@ :size="44" :show-user-status="showUserStatus && !isSearched" :show-user-status-compact="false" + :preloaded-user-status="preloadedUserStatus" :name="computedName" :source="participant.source || participant.actorType" :offline="isOffline" /> @@ -400,6 +401,25 @@ export default { canBePromoted() { return this.canModerate && !this.isModerator }, + preloadedUserStatus() { + if (this.participant.hasOwnProperty('statusMessage')) { + // We preloaded the status when via participants API + return { + status: this.participant.status || null, + message: this.participant.statusMessage || null, + icon: this.participant.statusIcon || null, + } + } + if (this.participant.hasOwnProperty('status')) { + // We preloaded the status when via search API + return { + status: this.participant.status.status || null, + message: this.participant.status.message || null, + icon: this.participant.status.icon || null, + } + } + return undefined + }, }, methods: { |