diff --git a/inbox/muc-avatars.xml b/inbox/muc-avatars.xml
index d2190c17..350f3bea 100644
--- a/inbox/muc-avatars.xml
+++ b/inbox/muc-avatars.xml
@@ -6,12 +6,12 @@
Restore to the first revision, and republish to the Historical track. Avatars are small images people often use to identify each other very quickly in chat applications. They are well defined for users, in &xep0084; and &xep0153;, but until now chat rooms and Pubsub nodes all shared a default icon. This extension provides a way for owners to associates an avatar to the XMPP their resources and users to discover that an avatar is associated and display it accordingly. Avatars are small images people often use to identify each other very quickly in chat applications. They are well defined for users, in &xep0084; and &xep0153;, but until now chat rooms all shared a default icon. This extension provides a way for owners to associates an avatar to their chat room, and for users to discover that an avatar is associated and display it accordingly. XMPP services have traditionally allowed owners to set a vCard-temp on a MUC using &xep0054;, this extension tries to keep as much of it as possible so existing applications don’t have to be modified too much. Some implementations recently chose to advertise those avatars using the existing &xep0153; extension in <presence/>, but it exposed issues in other implementations, and was only available when the user is already present in the room, not before joining it (for example when listing all available rooms). A future extension superseding this one could define a method based on &xep0084;, with a PubSub service on the room’s bare JID containing the metadata and data nodes. Such a specification should also define a compatibility profile similar to &xep0398; for user avatars, enabling the coexistence of both versions until the present one is deemed obsolete. This specification SHOULD: Before trying to use avatars, a client must check that the related service that is hosting the rooms or Pubsub nodes does support them. Before trying to use avatars, a client must check that the group chat service hosting a room does support them. Before anyone can see an avatar attached to the resource, an owner or some other priviledged entity must publish a vCard-temp containing the avatar’s data, using the protocol defined in &xep0054;. Before anyone can see an avatar attached to the room, an owner or some other priviledged entity must publish a vCard-temp containing the avatar’s data, using the protocol defined in &xep0054;. There is no other action required on the owner’s end. If the service doesn’t support support avatars, it must return a service-unavailable error. If the room doesn’t support support avatars, it must return a service-unavailable error. If the user trying to publish an avatar isn’t allowed to do so, the resource must return a forbidden error, see the Security Considerations. If the user trying to publish an avatar isn’t allowed to do so, the room must return a forbidden error, see the Security Considerations. The resource should then broadcast a notification that the configuration changed to all users present or subscribed. The room should then broadcast a notification that the configuration changed to all users present. For Pubsub nodes, the service broadcast a configuration change to all the subscribed users as described in the section 8.2.5.3 of &xep0060;. Setting an empty vCard unpublishes the avatar. At any point, whether it is during a join in order to display it in its UI, after having discovered the list of the rooms or Pubsub nodes and to list them with additional information, or when receiving a configuration change notification, a user’s client can discover information about a resource. At any point, whether it is during a join in order to display it in its UI, after having discovered the list of the rooms and to list them with additional information, or when receiving a <status code='104'/> configuration change notification, a user’s client can discover information about a room. If the resource has had an avatar published, it should advertise it in its 'muc#roominfo' or 'pubsub#meta-data' (see the section 5.4 of &xep0060;) extension form, using the &xep0153; hash computation method. If the room has had an avatar published, it should advertise it in its 'muc#roominfo' extension form, using the &xep0153; hash computation method. This 'muc#roominfo_avatarhash' or 'pubsubmuc#meta-data_avatarhash' are not present when the resource doesn’t have an avatar set. This 'muc#roominfo_avatarhash' will not be present when the room doesn’t have an avatar set. At this point the client knows the hash and can retrieve the resource's vCard-temp.
-
To retrieve the vCard-temp of a Pubsub node the client is then doing a specific request on the Node metadata (see the section 5.4 of &xep0060;).
- -The client then has to decode the <BINVAL/> content from base64, hash it with sha1 and compare it with the advertised hash, and if it matches uses it as the resource avatar under the <TYPE/> media type.
+The client then has to decode the <BINVAL/> content from base64, hash it with sha1 and compare it with the advertised hash, and if it matches uses it as the room avatar under the <TYPE/> media type.
An application MUST support the image/png media type, SHOULD support image/jpeg, image/gif and image/svg+xml, and MAY support additional formats.
-A room or a Pubsub node SHOULD NOT include a 'muc#roominfo_avatarhash' or 'pubsubmuc#meta-data_avatarhash' field if it doesn’t have an avatar set.
+A room SHOULD NOT include a 'muc#roominfo_avatarhash' field if it doesn’t have an avatar set.
Multiple <PHOTO/> elements may be present in a vCard, in which case they should all represent the same image and the hash field must contain a hash of all of them.
+Multiple <PHOTO/> elements may be present in a vCard, in which case they should all represent the same image and the 'muc#roominfo_avatarhash' field must contain a hash of all of them.
Some existing implementations send or expect a presence from the room’s bare JID in order to detect an avatar being published. This had several issues, with existing clients handling that as a presence from a user with an empty nick or downright triggering an error, and was only available if the client was already present in the room, preventing any usecase where it would get displayed before entering the room.
+Some existing implementations send or expect a presence from the room’s bare JID in order to detect an avatar being published. This had several issues, with existing clients handling that as a presence from a user with an empty nick or downright triggering an error, and was only available if the client was already present in the room, preventing any usecase where it would get displayed before entering the room.
For those reasons, this XEP doesn’t encourage this way of advertising the presence of an avatar, but for reference it would look like a &xep0153; presence payload:
- http://jabber.org/protocol/pubsub#meta-data
- XEP-XXXX
- Form extension for avatar support in a Pubsub node.
-
-
]]>