Skip to content
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

fix(Participant): show all federated users in remote conversations as online #11886

Merged
merged 1 commit into from Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/components/RightSidebar/Participants/Participant.vue
Expand Up @@ -353,6 +353,7 @@ import PhonePaused from 'vue-material-design-icons/PhonePaused.vue'
import Tune from 'vue-material-design-icons/Tune.vue'
import VideoIcon from 'vue-material-design-icons/Video.vue'

import { getCapabilities } from '@nextcloud/capabilities'
import { showError, showSuccess } from '@nextcloud/dialogs'
import { emit } from '@nextcloud/event-bus'

Expand Down Expand Up @@ -381,6 +382,8 @@ import { formattedTime } from '../../../utils/formattedTime.ts'
import { readableNumber } from '../../../utils/readableNumber.ts'
import { getStatusMessage } from '../../../utils/userStatus.js'

const supportFederationV1 = getCapabilities()?.spreed?.features?.includes('federation-v1')

export default {
name: 'Participant',

Expand Down Expand Up @@ -610,6 +613,10 @@ export default {
return this.participant.actorType === ATTENDEE.ACTOR_TYPE.USERS
},

isFederatedActor() {
return this.participant.actorType === ATTENDEE.ACTOR_TYPE.FEDERATED_USERS
},

isGuestActor() {
return this.participant.actorType === ATTENDEE.ACTOR_TYPE.GUESTS
},
Expand Down Expand Up @@ -752,7 +759,9 @@ export default {
* return this.participant.status === 'offline' || !this.sessionIds.length && !this.isSearched
*/
isOffline() {
return !this.sessionIds.length && !this.isSearched && (this.isUserActor || this.isGuestActor)
return !this.sessionIds.length && !this.isSearched
&& (this.isUserActor || this.isFederatedActor || this.isGuestActor)
&& (!supportFederationV1 || (!this.conversation.remoteServer && !this.isFederatedActor))
},

isGuest() {
Expand Down