processone / xmpp

Erlang/Elixir XMPP parsing and serialization library on top of Fast XML
http://process-one.net
Apache License 2.0
137 stars 88 forks source link

Change presence unavailable status message #35

Closed lovetox closed 6 years ago

lovetox commented 6 years ago
<presence xmlns="jabber:client" to="user" from="chat@dino.im/xxx" type="unavailable">
  <x xmlns="http://jabber.org/protocol/muc#user">
    <item affiliation="none" role="none" />
  </x>
  <status xml:lang="en">Stream closed by us: Timed out waiting for stream resumption (connection-timeout)</status>
</presence>

status is a text that should be displayed by the client to the user receiving this presence, if my client displays to me "Stream closed by us:" i wonder, why did my client close the stream with that contact.

If the goal was to make clear which side did close a stream, the word "us" fails terribly in this setting.

badlop commented 6 years ago

Right, it's ambiguous... the destination user may wonder who is "us". What's your proposal?

lovetox commented 6 years ago

Thinking about it, it makes things not much better if you remove the "us" Users of the client dont care about the technical reason why a user is offline.

Either we write a XEP so clients publish their status somewhere else, for example via PEP, or we write a XEP that servers can publish such technical debug infos in another element of the presence.

But mixing both user-set-status, and server-info-messages, seems not a good idea

shortterm i just will not show any status on unavailable presences to the user anymore, to reach the goal to show only status which was set by the user.

i close for now.

zinid commented 6 years ago

But mixing both user-set-status, and server-info-messages, seems not a good idea shortterm i just will not show any status on unavailable presences to the user anymore, to reach the goal to show only status which was set by the user.

I agree actually, that's the conclusion I came to as well after some thinking.