Skip to content

Commit

Permalink
fix(Participant): show all federated users in remote conversations as…
Browse files Browse the repository at this point in the history
… online with federation-v1 capability

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Mar 21, 2024
1 parent 9b35953 commit 8779ea8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/RightSidebar/Participants/Participant.vue
Original file line number Diff line number Diff line change
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

0 comments on commit 8779ea8

Please sign in to comment.