JC Brand
636f02109d
Various fixes in the delta algorithm
2016-12-07 13:02:03 +00:00
JC Brand
993c8f1695
We need to send out a separate IQ stanza for each affiliation
...
At least for Prosody.
2016-12-07 12:43:41 +00:00
JC Brand
54371f0e7d
Remove setAffiliation
and use the more general purpose setAffiliations
2016-12-07 11:45:51 +00:00
JC Brand
77d3e64f42
Specify the reason (if given) when setting someone's affiliation
...
This changed required me to go back to an array of maps instead of a single map
to store jids and affiliations.
2016-12-07 11:45:51 +00:00
JC Brand
b516ae51e7
Move code into separate function.
2016-12-07 10:34:02 +00:00
JC Brand
802c9d1f02
Make it configurable how the affiliations delta is computed.
...
When inviting someone to a members-only room, you only want to add an
affiliation of 'member' if they don't already have any other affiliation.
So we need to ignore the "new" member if they're already on *any* of the lists.
2016-12-06 20:04:08 +00:00
JC Brand
58f07cf115
Change the data structures representing members
...
Make the delta algorithm simpler. Fixed some delta bugs in the process.
2016-12-06 19:39:16 +00:00
JC Brand
c6767bcdaa
Refactor to send out 3 affiliation request stanzas.
...
One for each affiliation (member, owner, admin).
Unfortunately Prosody doesn't give you correct results if you query for all
three affiliations in one stanza.
We'll have to see whether setting all three in one stanza actually works.
2016-12-06 18:34:54 +00:00
JC Brand
6c725409c2
converse-muc: Only send the delta when setting the member list.
...
As required by XEP-0045.
This requires that we first fetch the existing member list, compute the delta
and then send that if there is one.
2016-12-06 15:18:33 +00:00
JC Brand
008c07596a
converse-core: Call _tearDown when initialized again
...
When it's clear that a previous teardown didn't happen.
So that objects can be garbage collected and that obsolete event handlers don't
fire anymore.
2016-12-06 11:07:52 +00:00
JC Brand
bd81a98ffa
converse-rosterview: Remove the rosterview when tearing down.
...
It gets created anew when reconnecting or logging in.
2016-12-06 11:06:21 +00:00
JC Brand
c877f63bf0
polyfill startsWith, to make the tests pass.
2016-12-05 18:55:11 +00:00
JC Brand
cf42911754
converse-muc: rename wrapping function again and put on converse
...
So that it can be overridden.
2016-12-05 18:31:58 +00:00
JC Brand
59ad285823
converse-core: cause can sometimes be DISCONNECTING
2016-12-05 15:22:47 +00:00
JC Brand
376c50fbc8
When inviting to a members-only room, first add to user to the member-list
2016-12-05 15:06:20 +00:00
JC Brand
088eb03b54
Immediately hide chat room on close.
...
Also, use sendPresence from latest strophe so that we have a timeout in case a
responding presence never comes.
2016-12-05 10:49:51 +00:00
JC Brand
7ad39cfdb9
Fetch the room information before opening the room.
2016-12-05 06:07:01 +00:00
JC Brand
67cdf5daf2
converse-muc: Expand the room configuration test
2016-12-04 18:06:11 +00:00
JC Brand
5b944f9e5f
Fixes #737 : translations weren't being applied.
2016-12-04 16:53:35 +00:00
JC Brand
e179811181
converse-controlbox: Fix empty controlbox toggle after disconnect
...
- Remove apparently unused `giveFeedback` method on ControlBoxView
- Don't show old connection feedback when rendering a new login form.
Now also no need to explicitly remove feedback after disconnection.
2016-12-04 16:37:07 +00:00
JC Brand
81e3cb976c
converse-muc: Show a spinner while fetching the config form
2016-12-04 15:11:09 +00:00
JC Brand
fd40f24710
converse-muc: Don't delete reference, can cause attribute error
2016-12-04 15:08:02 +00:00
JC Brand
be25c688ff
converse-controlbox: Use event listeners instead of (removed) overrides
...
Due to changes in `converse-core` the controlbox wasn't aware anymore of
disconnection or reconnection events.
2016-12-04 15:07:46 +00:00
JC Brand
f0a454561b
converse-core: Properly disconnect if reconnection attempt fails.
2016-12-04 15:00:46 +00:00
JC Brand
2a81d2e6f3
converse-mam: Don't fetch MAM messages on each page load.
2016-12-04 14:45:36 +00:00
JC Brand
3b3720c32d
converse-core: Attempt to log in again when reconnecting
...
and when auto_login is not `true`. Will only work if the page wasn't reloaded,
because then the password will still be on the connection.
2016-12-04 14:14:40 +00:00
JC Brand
ec91175a70
converse-muc: Don't send a join presence at every page reload.
...
Instead, keep track of the connection state of the room and send a presence
only when the room's connection was disrupted.
2016-12-04 14:41:03 +01:00
JC Brand
d7892d942c
converse-muc: Bugfix.
...
Switching from bookmarks form to config form shows only spinner.
2016-12-04 14:40:55 +01:00
JC Brand
d109ed9416
converse-muc: Fix failing test.
...
No need to manually call `renderChatArea`.
2016-12-04 14:40:50 +01:00
JC Brand
4026248c68
converse-muc: Fixes concerning room occupants.
...
- Fixed a sessionStorage caching bug caused by putting the nickname (which is
liable to change) in the cache key.
- Clear the occupants sessionStorage when closing a chat room.
2016-12-04 14:40:43 +01:00
JC Brand
69e2068241
converse-muc: Remove unused promises
...
Now that we cache disco info and not the room configuration.
2016-12-04 14:40:40 +01:00
JC Brand
81879bc070
converse-muc: Cache the room disco information
...
Instead of the room configuration.
This is because non-owners have access to the former, but not the latter.
2016-12-04 14:40:28 +01:00
JC Brand
0f4efac084
converse-muc: Docstrings.
2016-12-04 14:40:25 +01:00
JC Brand
fbf2e56be4
converse-muc: Cache the room configuration on the Backbone.Model object
2016-12-04 14:40:20 +01:00
JC Brand
6379676cff
converse-muc: Rename _transform
to getWrappedChatBox
.
2016-12-04 14:40:13 +01:00
JC Brand
5e1b094881
Expand upon rooms.open
testcase to test configuration
2016-12-02 21:35:56 +01:00
JC Brand
910e9bddcd
Refactoring in MUC
...
What started as an attempt to fix a bug in parseXUserElement, turned into
another large refactoring of MUC code, and it's not clear how to break this up
into multiple atomic commits. So I'm just pushing it all.
At least there are two new tests added to the suite.
2016-12-02 18:41:05 +01:00
JC Brand
8bbd88ba86
New release 2.0.3
2016-11-30 17:51:17 +00:00
JC Brand
a3bc7a18e5
Fixes #735 . Querying by attribute returns empty list
2016-11-30 18:47:29 +01:00
JC Brand
48791fa572
CSS fix.
2016-11-30 17:08:23 +00:00
JC Brand
829f9ab216
Release 2.0.2
2016-11-30 16:27:20 +00:00
JC Brand
0eee0dcaa1
Add Snyk (security-vulnerability checker)
2016-11-30 15:39:48 +01:00
JC Brand
5026627b95
Bump to strophe 1.2.10
2016-11-30 14:17:51 +00:00
JC Brand
de07b6a529
No need for two AMD-load cycles.
2016-11-30 12:18:58 +00:00
JC Brand
6abd805b52
Call trimChats immediately, not only after the element is visible
...
Since the element will already be taking up space (due to the
`opacity:0` property being used, instead of `display:none`).
2016-11-30 11:21:19 +01:00
JC Brand
9edc97101b
Don't maximize minimized rooms when calling rooms.open
2016-11-30 11:03:28 +01:00
JC Brand
96d311e2e9
Use CSS animations for fading in.
2016-11-30 11:03:28 +01:00
JC Brand
0d542cee8c
New config settings `allow_bookmarks
`
2016-11-24 09:52:05 +01:00
JC Brand
a4eb622aaa
checkForReservedNick
wasn't called if there aren't any bookmarks.
...
Updates #723 , #734
2016-11-24 09:45:17 +01:00
JC Brand
1b434dbe81
Updates #723 and #734 .
...
`converse.rooms.open` ignored the `muc_nickname_from_jid` setting.
2016-11-24 09:25:06 +01:00