Commit Graph

10 Commits

Author SHA1 Message Date
JC Brand
16d62bf9e4 Fix broken tests due to using ES2015 promises 2017-07-11 17:05:02 +02:00
JC Brand
02e5921415 Fix problem of stuck/hanging tests on TravisCI 2017-06-19 15:05:22 +02:00
JC Brand
0c43e4b87c Upgrade to Jasmine 2.5.3 2017-04-06 11:31:05 +02:00
JC Brand
8a63813f5e Add the ability to set the presence priority.
Fixes #745
2017-02-22 22:13:23 +01:00
JC Brand
17e0e70e4e Support for XEP-0203 delayed delivery of presence stanzas 2017-02-21 23:30:11 +01:00
JC Brand
4aa123d557 Add timestamps to resources
So that when a higher priority resource goes offline, we can fall back to the
right chat status if at the next priority level there are multiple resources.

789654d54e (comments)
2017-02-21 22:15:08 +01:00
JC Brand
29add969a6 Shut eslint up 2017-02-21 09:00:56 +00:00
JC Brand
7ae2e46925 Expand tests and found a bug in the process.
updates #785
2017-02-20 22:37:06 +01:00
JC Brand
789654d54e Updates #785 and #787
Improve upon the previous implementation.

If the resource with the highest priority goes offline or becomes unavailable,
then the chat status of the contact must fall back to that of the resource with
the next highest priority.

In your example from #785, if the resource with priority 1 goes offline or
becomes unavailable, then in your implementation the chat status would stay at
online, although it must actually go to xa.

The solution is to update the resources attribute on the contact to not just be
an array or strings, but instead to be a map of resources to priorities and
statuses and to use that data structure.
2017-02-20 22:29:13 +01:00
JC Brand
3aa5a83d02 Add a test case based on #785 2017-02-20 20:47:08 +01:00