Ticket #145 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Support XEP-0209 meta-contacts

Reported by: melo Owned by:
Priority: major Milestone: 1.0
Component: GUI Version: version 0.8
Keywords: 1.0rc1 Cc:

Description (last modified by melo) (diff)

There are at least two problems with the current implementation of meta-contacts in SAPO MSG Mac:

  • we update the users roster when we change information of the meta-contacts: this makes it difficult for new users to experiment with our client because we do non-reversible actions on their rosters. Its not polite;
  • there is no way to specify the preferred order of JIDs inside a meta-contact.

 XEP-0209 solves this problems.

We can use the order attribute to sort the JIDs in order of preference inside a meta-contact. In terms of GUI, this can be accomplished via drag-and-drop inside the Get Info window, in the JID list.

As tag, we can still use the current SHA1(lower_case(name)+lower_case(group)). This way, we can migrate current users to the new system cleanly. Also new users would receive already some meta-contacts if they have the same logic (same person => same name and same group) on all accounts.

The rest of the GUI can keep on using the notion of "prefered JID" of a meta-contacto to decide which avatar, and status to show for the user.

Change History

Changed 5 years ago by melo

  • keywords 1.0rc1 added

Changed 5 years ago by dbcm

Agree, this should be done. Been able to choose the default order is a plus.

Changed 5 years ago by melo

  • description modified (diff)

Changed 5 years ago by melo

This is a transcript of a short email conversation with João Pavão.

João noticed that if we set the storage:metacontat, other connected resources won't be notified of the change.

This is of course a problem with private storage and not with  XEP-0209, and when this XEP is updated to PIP, the problem will go away.

In the meantime, if we can't detect PIP, we must use private storage, so a solution for this non-update must be found.

The usual first solution is to use a <presence> plus a namespace to signal the update. This would work but it is a wrong solution because meta-contacts updates are private, and the <presence> would be sent to all our contacts.

But João came up with a better approach: a no-op roster set.

We set a roster entry with the same information as before. This will force a roster-push to all connected resources. We already have to get the storage:metacontacts on any roster push, so the change would reach all the resources, thus solving the problem.

We are all aware that this is a hack, a workaround. The correct solution is a PIP node. But this no-op roster set works for all accounts without PIP.

Changed 5 years ago by jppavao

(In [216]) Laid the initial foundation for supporting XEP-0209. References #145.

Changed 5 years ago by jppavao

(In [218]) Added an auto-save timer to the MetacontactsDirectory? class. Whenever there are uncommitted changes to the metacontacts of a given account, the new directory gets automatically saved to private storage on the next iteration through the Qt event loop. References #145.

Changed 5 years ago by melo

Hi,

I don't know how long is a "next iteration through the Qt event loop".

It is important to the server-side of things that multiple updates close together be done with a single IQ set. As a first approach, it would be helpful that the client waited at least 5 seconds without changes before saving.

Notice that it is 5 seconds without changes, so if you change it now, and then again 4 seconds from now, the save command will be 9 seconds from now, and if 8 seconds from now another change crops up, then the save will occur 13 seconds from now.

Changed 5 years ago by jppavao

(In [219]) Finished the initial implementation of the support for metacontacts in private storage (XEP-0209) on the core side. References #145.

Changed 5 years ago by jppavao

(In [220]) Finished the initial implementation of the support for metacontacts in private storage (XEP-0209) on the GUI side. JIDs can now be dragged in the Get Info window of a contact to change its order of preference. References #145.

Changed 5 years ago by jppavao

(In [221]) Fixed a newly introduced bug that broke dropping a contact directly into the JIDs list of a Get Info window. References #145.

Changed 5 years ago by jppavao

  • status changed from new to closed
  • resolution set to fixed

(In [222]) Added NOOP roster pushes to aid in keeping multiple connected resources of the same account synchronized in terms of their meta-contacts composition and ordering (XEP-0209). Whenever a meta-contact is modified, a NOOP roster push is emitted by the client. Whenever a roster push not originated by a local change is received, the client re-fetches all the meta-contacts information from the server private storage so that it can update the meta-contacts in the local roster. Closes #145.

Changed 5 years ago by jppavao

(In [225]) Switched off all the meta-contacs debug messages being output to the console. Refs #145.

Changed 5 years ago by jppavao

(In [227]) Added some account info to the meta-contacts debug messages being output to the console. Refs #145.

Note: See TracTickets for help on using tickets.