Commit Graph

3345 Commits

Author SHA1 Message Date
JC Brand
8ef7461627 Simplify the onDisconnected method. Add some docstrings.
Let debounced reconnection happen on the leading edge.
2017-02-01 16:24:28 +00:00
Lauri Niskanen
cbc0a40e12
Allow setting contact attrs on chats.open 2017-02-01 18:13:12 +02:00
JC Brand
4a6d85661a Use template loader that works with lodash.
Also update pluggable.js to a version that works with lodash.
2017-02-01 13:24:34 +00:00
JC Brand
081f075aa9 Add eslint with lodash checking and apply its suggestions 2017-02-01 14:02:18 +01:00
Richard Icke
343e5777d1 first attempt to replace underscore with lodash 2017-02-01 14:00:38 +01:00
JC Brand
327507412b Update changelog, bump pluggable.js, move files to 3rdparty directory 2017-02-01 14:00:38 +01:00
JC Brand
527ed7bb64 Downgrade clean-css, image URLs were wrong. 2017-02-01 12:50:23 +01:00
JC Brand
85b264e859 Use clean-css-cli 2017-02-01 11:39:16 +00:00
JC Brand
e34adf8000 New release: 2.0.5 2017-02-01 11:08:13 +00:00
JC Brand
25d9880f9e Add config setting allow_non_roster_messaging
- Add a test case.
- Don't allow passing of `attrs` to `chats.open`. Not sure yet of the
  implications of this.
2017-02-01 10:49:13 +00:00
Lauri Niskanen
246edf8a66 Allow chatting with users not in roster
Resolves #760.
2017-02-01 10:49:13 +00:00
JC Brand
4093064eaa chore(package): update greenkeeper to version 4.1.0 (#769)
https://greenkeeper.io/
2017-02-01 10:49:13 +00:00
Greenkeeper
3b921fa409 chore(package): update clean-css to version 4.0.3 (#767)
https://greenkeeper.io/
2017-02-01 10:49:13 +00:00
JC Brand
e81eaf323e Prevent forging of messages via carbons. 2017-02-01 10:49:13 +00:00
JC Brand
0cf9903726 Fix failing tests. 2017-02-01 10:49:13 +00:00
JC Brand
9510bdc152 Remove minimized chats when logging out. 2017-02-01 10:49:12 +00:00
JC Brand
d96bc6ebe4 Avoid sending 'auth fail' feedback twice. 2017-02-01 10:49:12 +00:00
JC Brand
af42bc0696 Only close controlbox when logging out
Not when the connection failed due to other reasons (like wrong credentials).
2017-02-01 10:49:12 +00:00
JC Brand
c1662c6339 Properly disconnect upon "host-unknown" error. 2017-02-01 10:49:12 +00:00
JC Brand
25e570c7ed Bugfix. connection.reset should only be called after disconnected 2017-02-01 10:49:12 +00:00
JC Brand
8cdadca492 Bugfix. Login form wasn't rendered after logging out
when `auto_reconnect` is set to true.
2017-01-31 19:32:12 +00:00
JC Brand
1fb6ad7310 Update changelog and bump pluggable.js 2017-01-26 09:37:35 +00:00
Leo
7ddca47032 Render all drag resize handles in ChatRoomView (#758)
The ChatRoomView renderDragResizeHandles is only rendering the top resize handle (<div class="dragresize dragresize-top"></div>). the insert was only inserting the first child of the dragresize template, which has 3 children. Modified to insert the whole the div that the dragresize template gets inserted into.
2017-01-23 08:33:17 +01:00
JC Brand
bd00fabe18 Add documentation on creating custom builds. 2017-01-20 09:18:18 +00:00
JC Brand
d6b5ed5e1e Handle case where locales is not defined. 2017-01-16 22:07:58 +01:00
JC Brand
24da4f6097 Add keywords for composer 2017-01-15 19:41:58 +00:00
JC Brand
0b6775e6d4 Update to strophe 1.2.12. Updates #751 and #753 2017-01-15 10:22:07 +00:00
JC Brand
cbf9617734 Fix selector for cancel button. 2017-01-15 09:31:23 +00:00
Fabio Montefuscolo
a95fbcc0f8 create composer.json to add this project in packagist.org 2017-01-13 18:37:47 +01:00
JC Brand
c5fc477e9b Fix doc URLs 2016-12-13 20:01:20 +00:00
JC Brand
06805d80b8 New release 2.0.4 2016-12-13 19:47:00 +00:00
JC Brand
c16dac1453 Rather don't expect join to always return the right context. 2016-12-09 19:15:16 +00:00
JC Brand
0bcf61389f Work around a Prosody bug.
Prosody doesn't handle it if we set the affiliation for multiple JIDs in one
stanza, so we need to send a stanza for each JID.

Refs https://prosody.im/issues/issue/795
2016-12-09 19:11:16 +00:00
JC Brand
37df4ad18c Bugfix. Need to return this. 2016-12-08 14:23:17 +01:00
JC Brand
035f5d683a Add unit tests for how the affiliations delta is computed. 2016-12-08 12:44:18 +00:00
JC Brand
e0b1d1d77d Mention stack overflow instead of the mailing list.
Apparently the mailing list hasn't been working since months.
2016-12-08 12:02:24 +00:00
JC Brand
b2240cfe94 Use $.when to keep track of all outgoing promises
Now that we are sending multiple IQ stanzas when setting affiliations.
We now again have a sendAffiliation method, so we use that.
2016-12-08 07:34:01 +00:00
JC Brand
f5fbf71275 New config setting: muc_disable_moderator_commands 2016-12-07 13:48:47 +00:00
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