This fixes the Presence TreeSet's Comparator. If the comparator can't
determine a greater or less than relationship, it will sort by the name
of the resources lexicographically.
A (mathematical) set is a collection of distinct objects. A TreeSet's
compare function determines relation of two objects. It also determines
equality and since this is a Set it would effectively replace the old
one in the set, if the function returns 0. This method wasn't fully
equals consistent, meaning different objects were deemed equal by the
comparator. That lead to an inconsistency in the representation of
presence objects and resources that contact has connected. The resources
not represented in this TreeSet would no longer be able to let the
contact appear as Online.
We should still use the old implementation for checking offline contacts
capabilities. This will give us the 'offline capabilities' e.g.
messaging offline contacts.
This reintroduces some old code in order to give the user the option to
switch between those two behaviours.
It also prevents the removal of all caps nodes (and thusly breaking the
new detection) when a rogue offline presence event comes in. This is
such an event in which a contact is falsely assumed as offline, if the
preferred resource of two or more same prioritised resources goes
offline. We are checking this by looking whether it is a
"resourceChanged"-event. This should probably be changed again, after
those offline presence updates have been fixed.
This changes the behaviour from "last connected resource" or "highest
priority resource" to "most capable resource" regarding the display of
buttons next to this contact. We now check every resource the contact
has connected and we will consider the one with the most capabilities.
This elimates the very frustrating scenario in which the call
capabilites are disabled on a contact who connected additionally a
non-jingle client.
Note that there exists separate issue in which the contact logs off from
only one resource, but gets displayed as completely offline. In that
case the buttons are still displayed wrong, if the contact connects a
non-jingle client on afterwards.
Fixes#162Fixes#163Fixes#172
The build process injects an additional bundle at start level 14. This
conflicted with the start level for commons-codec, preventing Jitsi to
start. Felix' bundle cache might have prevented the bug from appearing
for people who had a previous version running successfully.
VariantClear fails with DISP_E_BADVARTYPE if this is not indicated,
causing Office 2016 to crash. I'd guess they fixed a memory leaked so
this only appears from version v16 (onwards).