element-ios icon indicating copy to clipboard operation
element-ios copied to clipboard

[Presence] the presence info should not be displayed when the feature is not supported server side

Open giomfo opened this issue 3 years ago • 2 comments

Your use case

When I connect a matrix.org account in Element-iOS, all the members of a room are displayed offline except the current user (displayed in the first position) image

This offline information is not relevant

Have you considered any alternatives?

We should be able to know client side if the presence is supported or not on the server side to hide presence information in the UI

How to provide this configuration to the client?

  • by adding a new flag in _matrix/client/versions response, see https://matrix.org/_matrix/client/versions (I don't think this is the right place)
  • by defining a new Client-Server endpoint
  • by using a config.json file (see https://github.com/vector-im/element-meta/issues/557)

Element-web is using the third option, see enable_presence_by_hs_url key in https://app.element.io/config.json

Additional context

This request should be taken into account at least for element-x-ios

giomfo avatar Aug 19 '22 14:08 giomfo

@giomfo Would it work for you to do the same thing that the PresenceIndicatorView does and use MXPresenceUnknown as a cue to hide the status? @aringenbach implemented this so can probably provide more context.

pixlwave avatar Aug 19 '22 16:08 pixlwave

@giomfo Would it work for you to do the same thing that the PresenceIndicatorView does and use MXPresenceUnknown as a cue to hide the status? @aringenbach implemented this so can probably provide more context.

Yes, this sounds like a good plan. @aringenbach do you know why it was not already done? is there any blocker?

giomfo avatar Aug 19 '22 18:08 giomfo

@giomfo Yeah I think the only issue that we could have with this is handling the 'self' user presence, given that we just suppose in Element-iOS that they are online since they are currently using the application. Otherwise using MXPresenceUnknown should work for any other user (currently it's marked as offline: see presenceText in Tools.m).

Sorry for the late response, never got a notification for this.

aringenbach avatar Nov 22 '22 13:11 aringenbach