JC Brand
9779e83931
Make the default archived_messages_page_size
100
2017-02-25 09:57:22 +01:00
JC Brand
adb4f62ea9
Fixes #790 mam retrieval broken
2017-02-25 09:54:41 +01:00
JC Brand
2c8b31c19d
Bugfix. getAttribute
returns null
2017-02-25 09:33:34 +01:00
JC Brand
2998ef818a
Chat rooms weren't being scrolled down after page reload
2017-02-25 07:48:28 +00:00
JC Brand
61b2dc7f99
Move MAM code to proper place.
...
Also, don't query for MAM messages if the chat room doesn't support it.
2017-02-24 20:52:23 +00:00
JC Brand
0d48929bb3
Show join/leave messages in chat rooms. Updates #365
2017-02-24 17:54:45 +00:00
JC Brand
b15c107e4e
Don't show notifications for full JID headline messages if...
...
allow_non_roster_messaging is false.
2017-02-24 17:13:38 +00:00
JC Brand
453d98db2c
Use native API instead of jquery
2017-02-24 17:13:38 +00:00
JC Brand
5c445a0268
Don't show headlines from full JID if allow_non_roster_messaging is false
2017-02-24 17:13:38 +00:00
JC Brand
6dfc82da0b
Native querying instead of using jquery
2017-02-24 12:00:05 +00:00
JC Brand
2ae2a1b505
Updated a bit to make it clearer.
2017-02-24 12:00:05 +00:00
JC Brand
305559a85c
Use sizzle in converse-muc.js
2017-02-24 12:00:05 +00: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
40605607e6
Specify radix for parseInt
2017-02-21 22:17:05 +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
728c7622e9
Use composition instead of chaining
2017-02-21 09:50:44 +01:00
JC Brand
d79bfe6f28
Use composition instead of chaining.
2017-02-21 09:35:50 +01: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
w3host
15d2640c43
Presence priority NOT handled correctly #785 ( #787 )
2017-02-20 20:48:09 +01:00
JC Brand
62889089a6
Keep the features section near the bottom.
2017-02-20 14:35:15 +00:00
JC Brand
c845d419fe
Better way of getting a hold onto the chat room view
2017-02-19 11:03:24 +00:00
JC Brand
4c41ae8fad
Render room features separately
...
So that the occupants list doesn't get wiped.
2017-02-19 11:16:27 +01:00
JC Brand
9817aedea7
No need to set templates on the _converse object.
...
If it's needed in another plugin, it can simply be `require`'d.
2017-02-19 11:12:26 +01:00
JC Brand
054cba6503
Make accept/decline buttons accessible
2017-02-19 09:03:58 +00:00
JC Brand
a5bfd7fa57
Hide invite widget if the room is not open
...
or if the room is members-only and the user is not the owner.
2017-02-19 01:18:36 +00:00
JC Brand
441f7a2a15
Show the chatroom occupants JID in the tooltip
...
if you're allowed to see it.
2017-02-19 01:08:08 +00:00
JC Brand
a6ca5aad35
Show room features in the sidebar.
2017-02-19 00:39:08 +00:00
JC Brand
10a85336cc
Show the description in the heading, not the subject
2017-02-19 00:20:21 +00:00
JC Brand
0a99b9f22a
Don't query for room features for restored chat rooms.
2017-02-19 00:20:21 +00:00
JC Brand
efa8776881
By convention keep the render methods immediately after initialize
2017-02-18 10:03:26 +00:00
JC Brand
61bee4c263
The Strophe.Connection obj needs to be reset before reuse.
...
Otherwise re-login hangs after authfail.
2017-02-18 09:46:33 +00:00
JC Brand
33cc2c3cf5
Remove #BBB code for the deprecated prebind
option
...
replaced with the `authentication` option
2017-02-18 09:35:16 +00:00
JC Brand
fe6cb93a63
MUC: don't send out chat hints before join or after leave
2017-02-17 22:17:19 +01:00
JC Brand
f83043e5ab
Fix reference to missing parameter.
2017-02-17 22:07:11 +01:00
JC Brand
6379b0dd7a
Include the version number in the build files.
2017-02-17 20:52:08 +00:00
JC Brand
a1c156456d
Make keepalive
and roster_groups
true by default.
2017-02-17 08:54:58 +01:00
JC Brand
a2081d656c
Add shim for awesomplete
2017-02-16 14:26:48 +01:00
JC Brand
9218d649e9
Bugfix. Avoid infinite recursion (used wrong model).
2017-02-16 11:17:38 +01:00
JC Brand
65fa39dd81
Properly fix and test the /me command
2017-02-15 21:03:02 +00:00
JC Brand
a033899946
Fix leaky abstraction of MUC
2017-02-15 20:30:32 +00:00
JC Brand
148516e0cc
Fix almond builds. updates #779
2017-02-15 20:01:41 +00:00
JC Brand
61568aca32
The notification option wasn't being used consistently
2017-02-15 19:12:45 +00:00
JC Brand
ba9d3c36d5
Refactored converse-otr.js
...
- Removed password encryption of the key.
It never properly worked and bloated the build through extra dependencies.
- Store the key and instance tag on the ChatBox model.
2017-02-15 11:15:03 +00:00
JC Brand
70d385bc28
Use AMD-aware cryptojs from NPM. Update to 0.2.16
2017-02-15 10:02:15 +00:00
JC Brand
073a95b7e6
Avoid visibility transience and fix failing test
2017-02-15 07:46:24 +00:00
JC Brand
fbdbea223d
Ensure consistent behavior from show_controlbox_by_default
2017-02-14 17:23:22 +00:00
JC Brand
e52a775430
Bugfix. See below.
...
"TypeError: this.sendConfiguration(...).then is not a function" when a room is created
2017-02-14 16:55:32 +00:00
JC Brand
bc8e3e1a01
Return a Backbone.View object instead of a wrapper
...
When returning chat boxes via the API.
We can do this now because these API methods are only available to
(whitelisted) plugins.
2017-02-14 15:10:46 +00:00
JC Brand
fe6a9ca748
Merge converse-api and converse-core
...
Otherwise `require('converse-core')` can be called, exposing the inner converse
object.
2017-02-14 14:35:52 +00:00
JC Brand
495c6060f9
Allow non-roster contacts to be invited to a chatroom.
2017-02-14 14:35:31 +01:00
JC Brand
7b65155d5b
Don't show chat-state notifications by default.
2017-02-14 13:00:45 +00:00
JC Brand
d2227c8d44
Replace typeahead with awesomplete.
...
Much smaller library.
No dependence on jQuery.
Updates #779
2017-02-14 12:26:56 +01:00
JC Brand
994c961d9c
Add a waitUntil
API for promises.
2017-02-14 11:24:20 +01:00
JC Brand
3b8431dd7a
Revert "Escape interpolated values. Updates #779 "
...
This reverts commit e63607227d
.
2017-02-14 07:47:38 +01:00
JC Brand
e63607227d
Escape interpolated values. Updates #779
2017-02-14 07:28:04 +01:00
JC Brand
54136a9447
Merge branch 'pr/chats_open_attrs' of https://github.com/Ape/converse.js into Ape-pr/chats_open_attrs
2017-02-13 15:26:40 +00:00
JC Brand
d334870d00
Render the login form again upon authfail.
2017-02-13 15:23:26 +00:00
JC Brand
48a3c30e75
i18n locale can now be specified with only the language code
2017-02-13 15:16:16 +00:00
JC Brand
fddcd1c6cf
Improved roster filter UX.
...
Keep the focus in the input after filtering.
Prevent form submission from reloading the page.
2017-02-13 15:07:46 +00:00
JC Brand
f73a1d3fc0
Don't name the modules.
...
According to the require.js docs this shouldn't be done.
http://requirejs.org/docs/whyamd.html#namedmodules
2017-02-13 14:37:17 +00:00
JC Brand
fd2f1c22e4
Fixes #775
2017-02-13 14:26:59 +00:00
JC Brand
acf0e19d99
Fixes #774
2017-02-13 14:20:16 +00:00
JC Brand
5f67797202
Fixes #749
2017-02-13 14:00:05 +00:00
JC Brand
85f6a75fed
Escape user-generated input to avoid injection attacks
2017-02-13 13:41:37 +00:00
JC Brand
bfd3e7f0b6
Bugfix. Show custom status, not chat status.
2017-02-13 12:00:46 +00:00
JC Brand
6d2a38a7c1
Fixes #486 Update docs and fix failing test.
2017-02-12 19:01:07 +00:00
throwaway42
c34dcfaadc
Honor existing mam user configuration #486
2017-02-11 19:08:26 -03:00
JC Brand
7ad555d97f
Correct rev for pluggable.js.
...
Don't include muc-embedded by default
2017-02-04 09:32:24 +00:00
JC Brand
ebbde138db
Add the ability to whitelist/blacklist plugins.
2017-02-03 18:26:27 +00:00
JC Brand
552b80fe69
Fix typo that came in during bulk renaming
2017-02-03 12:25:59 +00:00
JC Brand
da23015ced
Massage require.js's config so that builds work
...
without underscore.js
2017-02-02 22:38:16 +00:00
JC Brand
63888dd454
Fix failing tests
2017-02-02 21:55:05 +00:00
JC Brand
890d87c980
Add initial demo of embedded MUC chat
2017-02-02 21:55:05 +00:00
JC Brand
761970c903
Update plugins to not depend on converse-core
...
To illustrate that this is not necessary (and also not possible with
non-bundled plugins).
2017-02-02 20:50:52 +00:00
JC Brand
0424df9edc
Rename the closured converse object to _converse
...
to indicate that it's private and to differentiate it from the outer "global"
converse object.
2017-02-02 20:43:48 +00:00
JC Brand
3699a0af5c
createMessage
no longer takes jQuery object
2017-02-02 19:45:16 +00:00
JC Brand
7c15e2f179
Some initial work on removing jQuery
2017-02-02 19:42:01 +00:00
JC Brand
83feebb229
Two plugins changes
...
- Remove the `plugins.remove` API method.
- Throw an error when attempting to register multiple plugins with the same name.
2017-02-02 18:54:15 +00:00
JC Brand
9b48b2d6bd
Update plugins to not depend on converse-core
...
To illustrate that this is not necessary (and also not possible with
non-bundled plugins).
2017-02-02 18:34:13 +00:00
JC Brand
b701c4830f
Also use _converse
as pluggable object reference.
2017-02-02 18:34:13 +00:00
JC Brand
b7b9711296
Rename the closured converse object to _converse
...
to indicate that it's private and to differentiate it from the outer "global"
converse object.
2017-02-02 18:34:13 +00:00
JC Brand
4dcb855562
Split API into public and private (plugin only) parts.
2017-02-02 18:30:59 +00:00
JC Brand
1620dad104
Move dragresize-specific code out of converse-headline.js
2017-02-02 18:30:43 +00:00
JC Brand
647ee1ff04
Replace jQuery-based event emitter with Backbone.Events
2017-02-02 18:30:43 +00:00
JC Brand
ca5a00d36b
Some cleanup and remove unused file.
2017-02-02 18:30:08 +00:00
JC Brand
39d62209c7
createMessage
no longer takes jQuery object
2017-02-02 18:30:08 +00:00
JC Brand
4b22c8ba7b
Use sizzle for tricky selector queries
...
Specifically involving querying by the 'xmlns' attribute, where I've had issues
in the past.
2017-02-02 18:30:08 +00:00
JC Brand
77f93a6471
Some initial work on removing jQuery
2017-02-02 18:30:08 +00:00
JC Brand
8f753ab7b8
The animationend
handler doesn't get be called in chromium
2017-02-02 16:07:00 +01:00
JC Brand
8d69357b52
Debounce scrollDown
2017-02-02 16:06:49 +01:00
JC Brand
82665d17fb
By default allow chatting with pending/requesting users
2017-02-02 14:57:17 +01:00
JC Brand
bcbeb8da6c
Case-insensitive matching of moderation commands.
...
Also add `/subject` as alias to `/topic`
2017-02-02 14:56:56 +01:00
JC Brand
46e231b4b3
Emit 'will-reconnect' event
2017-02-01 17:36:20 +00:00
JC Brand
65852f4e7c
Remove what appear to be unnecessary calls
2017-02-01 17:08:36 +00:00
JC Brand
60f86378a4
Handle reconnection on authfail edge case.
...
Attempt reconnection on authfail when credentials_url and auto_reconnect are set.
2017-02-01 16:34:38 +00:00
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
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
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
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
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
cbf9617734
Fix selector for cancel button.
2017-01-15 09:31:23 +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
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
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
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
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
a3bc7a18e5
Fixes #735 . Querying by attribute returns empty list
2016-11-30 18:47:29 +01: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
JC Brand
182dc55f11
Bugfix. event wasn't defined
2016-11-24 02:06:58 +01:00
JC Brand
0b22b5a6e0
Emit a reconnecting
event.
2016-11-23 14:50:28 +00:00
JC Brand
bfde4d3e4c
Reconnection fixes.
...
- Reconnection failed if original connection was never established
- When the `credentials_url` is specified, keep on trying to reconnect.
2016-11-23 11:53:06 +00:00
JC Brand
e90632d6fd
Bugfix. No roster when reconnecting.
2016-11-23 10:24:33 +00:00
JC Brand
a5f76abcf1
Updates #729 . Minimized chat boxes don't stay hidden
...
Bug got introduced during fix for #677
Eventually had to do a significant refactoring, to more consistently use the
`hidden` class instead of `display: None`. (relevant for #695 )
2016-11-22 17:42:58 +01:00
JC Brand
c3b2a913bb
Don't open the controlbox on requesting contacts.
...
Can get annoying very quickly
2016-11-22 17:41:57 +01:00
JC Brand
06cbd5cdd0
Use the chats_panel.html template in converse-minimize.js
...
To which it's actually applicable (instead of core).
2016-11-22 17:39:36 +01:00
JC Brand
586bbd0e4d
Bugfix. First configure browserStorage
for ChatBoxes
...
before populating the roster.
2016-11-22 09:35:36 +00:00
JC Brand
3b38f7237c
Bugfix. Chatboxes aren't closed when logging out.
2016-11-22 09:12:39 +00:00
JC Brand
c670893058
Bugfix. Arrays in configuration settings were ignored.
2016-11-22 08:55:52 +00:00
JC Brand
5a72466c45
Rename variables to adhere to coding style.
2016-11-22 08:54:17 +00:00
JC Brand
5e9e685219
Mention the actor (if available) when removed from room
2016-11-21 13:10:36 +00:00
JC Brand
e02c044ae4
Refactored notification code
...
responsible for showing messages based on the extended presence information.
- Use DOM API instead of jQuery
- Make info messages overridable (allows also for disabling them)
- Break up large function with inline callbacks into smaller ones
2016-11-21 12:57:22 +00:00
JC Brand
ebc7409d55
Enable new rooms to be configured automatically
...
Via `rooms.open` API method.
2016-11-20 16:42:11 +00:00
JC Brand
9bf00241de
Updates #721 Restore sessions when logging in anonymously
...
together with keepalive.
2016-11-07 18:48:49 +01:00
JC Brand
8c3ffdffbb
Release 2.0.1
2016-11-07 14:43:48 +00:00
JC Brand
d26d41a701
Use 'hidden' class instead of .hide()
. Fixes #706
2016-11-07 14:10:39 +00:00
JC Brand
27035d47dc
Remember toggle state of bookmarks list.
2016-11-03 15:33:56 +00:00
JC Brand
a2f4acdcee
All tests suites now updated and isolated.
2016-11-03 13:59:05 +00:00
JC Brand
3e4095734b
Call _tearDown
when logging out.
...
This is necessary for cleaning up after tests (now that each test has its own
initialized converse).
Should hopefully not cause any issues when logging out during normal use.
2016-11-03 13:59:05 +00:00
JC Brand
0c2c7be467
Close the controlbox when logging out...
...
and don't show the online count in the toggle.
2016-11-03 13:59:05 +00:00
JC Brand
5610d759c8
Call removeAll
on rosterview when tearing down.
...
Otherwise RosterContactView objects stay around and keep on listening.
2016-11-03 13:59:05 +00:00
JC Brand
50275cce64
Remove shared state between tests
...
Only a small subset of tests currently working with this.
2016-11-03 13:59:05 +00:00
JC Brand
d3090f80bc
Remember which panel was open when reloading the page.
2016-11-02 22:08:20 +00:00
JC Brand
e5b2acde06
MUC: Don't send out unavailable presence when connection is lost.
2016-11-02 14:51:23 +00:00
JC Brand
02864fd175
Don't assume the parent is the top-level message element.
2016-11-02 13:42:20 +00:00
JC Brand
151a476084
Find more cases of children
that should be find
.
2016-11-02 13:38:42 +00:00
JC Brand
ed01081240
Use $.find instead of $.children
...
To allow for better template customization.
2016-11-02 13:33:20 +00:00
JC Brand
38db959e11
Reconnection fixes. Fixes #712
...
- Remove groupviews, so that they'll get recreated upon reconnection
- Don't call `clearSession` when reconnecting. We want to reuse the
Backbone collections.
- Emit `rosterInitialized` event and use that in converse-rosterview.js
(instead of overriding).
- Refactor `onReconnected` to emit `rosterReadyAfterReconnection`, call
`converse.populateRoster()` and `converse.chatboxes.onConnected()`.
- Recreate the roster view on the `rosterReadyAfterReconnection` event.
2016-11-02 13:13:49 +00:00
JC Brand
0d4993ef86
Merge branch 'master' of github.com:jcbrand/converse.js
2016-11-02 13:13:34 +00:00
JC Brand
e3d59afd80
Use converse
instead of this
, or that
instead of bind
2016-11-02 12:46:29 +00:00
JC Brand
ec9ed96568
Remove {{message}}
interpolation.
...
It's not used and confuses people. Instead the message gets inserted via
`$.text`, to avoid injection attacks.
2016-11-02 11:10:07 +00:00
JC Brand
e63853ee92
Add a logout
event.
...
updates #714
2016-11-02 08:42:24 +01:00
JC Brand
b6c88b92fd
Don't listen exclusively for keypress in a textarea
...
Could be a different element as well.
2016-10-28 13:32:35 +00:00
JC Brand
7b003f1d9a
Bugfix. Handle case where controlbox plugin is not loaded.
2016-10-27 13:22:57 +00:00
JC Brand
6f1ac50893
Move leaky MUC abstractions out of converse-chatview.js
...
In the process also updated `updateSettings` to allow merging.
2016-10-27 14:56:31 +02:00
JC Brand
1b264461d7
Bugfix. Return after disconnection
2016-10-27 10:58:51 +00:00
JC Brand
bc5cd95a98
Various bookmarks fixes.
...
Including:
- Always render bookmarks list
- Hide bookmarks list if no bookmarks available
- Only send bookmarks stanza when appropriate
2016-10-27 10:49:09 +00:00
JC Brand
11c9670fc7
Render bookmarks list again after reconnection.
2016-10-27 10:38:06 +02:00
JC Brand
5b34ca9e37
Init bookmarks upon reconnection
2016-10-27 10:20:10 +02:00
JC Brand
a09db2746c
Only set muc domain once connected
2016-10-27 10:08:05 +02:00
JC Brand
9ea018a512
Trigger onBookmarksFetched
event and use to autojoin rooms
2016-10-27 10:07:45 +02:00
JC Brand
aad90cc9df
Add the ability to set the MUC domain to be used.
...
updates #203
2016-10-26 13:31:18 +00:00
JC Brand
01c3a50cc2
Add code to generically and recursively update user settings.
...
Also moved chatview specific settings.
2016-10-26 14:14:49 +02:00
JC Brand
49500a5f2c
Fix jshint error: undefined $
2016-10-21 14:36:09 +00:00
JC Brand
d12309d70e
Move converse.js to src/converse.js
...
Also remove "jquery", will be loaded implicitly
2016-10-21 13:52:00 +00:00
JC Brand
a51d503ea5
Remove invalid comment
2016-10-20 12:31:15 +00:00
JC Brand
1de2f7145c
Let bookmarks list use same markup/css as the available rooms list
2016-10-18 11:34:46 +02:00
JC Brand
623c56c89f
Minor refactoring.
...
Split showRoomInfo into two new methods.
2016-10-18 11:34:46 +02:00
JC Brand
0fe4031a1b
Close all chat boxes when disconnected (with no reconnection attempt)
2016-10-18 11:34:46 +02:00
JC Brand
2d6d4df1f1
Use requestAnimationFrame instead of setTimeout
...
For better performance.
2016-10-17 13:16:41 +02:00
JC Brand
4b28f3f803
Bookmarks fixes.
...
- Remove bookmark from list when removed from collection
- Only render list after all bookmarks have been fetched
- Properly remove bookmarks from sessionStorage
2016-10-17 11:20:20 +02:00
JC Brand
b832285d93
Markup fix to allow bigger chatview avatar
2016-10-15 00:02:22 +02:00
JC Brand
862af642ff
Move avatar markup to a template and make size configurable
2016-10-14 23:42:54 +02:00
JC Brand
2712bcb7cc
Use strophejs-plugins from NPM
2016-10-13 21:55:39 +00:00
JC Brand
f60ee4d640
Refactor rooms to have separate handlers for presence and message stanzas
2016-10-13 18:22:37 +02:00
JC Brand
43ae702c7a
Only fetch bookmarks once chatboxes can be handled.
2016-10-13 18:08:59 +02:00
JC Brand
5a3917925e
Add a new configuration setting: connection_options
...
Allows you to pass in options for the `Strophe.Connection` constructor.
2016-10-12 14:16:34 +02:00
JC Brand
8d2788c543
Handle case where there aren't bookmarks
2016-10-06 14:21:08 +02:00
JC Brand
fc48e02937
More lazily render the bookmarks list
...
Could still be improved.
2016-10-06 13:21:59 +02:00
JC Brand
0020be34d7
Show a list of current bookmarks in the "Rooms" panel
2016-10-06 12:05:25 +02:00
JC Brand
e39999f3ec
Check bookmarks for nicks when joining rooms
2016-10-05 23:15:42 +02:00
JC Brand
6972066076
Bookmarked rooms will now be automatically opened
...
If configured for it.
2016-10-05 23:15:42 +02:00
JC Brand
e80f001b35
Allow bookmarks to be removed from rooms
...
Refactored the code a bit in the process.
2016-10-05 23:15:42 +02:00
JC Brand
7ca7943706
Indicate whether a chatroom has been bookmarked.
2016-10-05 23:15:42 +02:00
JC Brand
3363041625
_super
has been renamed to __super__
.
2016-10-05 23:15:42 +02:00
JC Brand
3e77deee26
Bugfix in format of IQ stanza to save bookmarks.
2016-10-05 23:15:42 +02:00
JC Brand
052dd19252
Initial work on adding chatroom bookmarks.
2016-10-05 23:15:42 +02:00
Mathias Ertl
1ba68dc8b2
Csp compat ( #695 )
...
* Remove some inline CSS style to improve CSP compatibility
* update changelog
2016-10-03 19:45:06 +02:00
JC Brand
fa4e51f3ba
Handle undefined settings being passed in.
2016-09-30 10:42:15 +02:00
JC Brand
90d1071df0
Load templates in the respective plugins
2016-09-23 12:35:01 +02:00
JC Brand
ab76f1da44
Let core populated the roster, and send the initial presence
...
This allows for cleaner separation between core and rosterview, making it
easier to remove that plugin for more stripped down deployments.
2016-09-21 15:06:48 +02:00
JC Brand
ac2c5f3e4e
Allow the context to be passed in when registering event listeners
...
Similar to how backbone.js does it.
2016-09-21 13:15:45 +02:00
JC Brand
05a577059b
Use converse
instead of this
, to be more explicit.
2016-09-21 11:48:53 +02:00
JC Brand
d8d1c283a7
Let the RosterView render and populate itself
...
instead of having the ControlBoxView do it. This provides for cleaner
separation between the two plugins.
2016-09-21 11:48:43 +02:00
JC Brand
7030495275
Refactor the rosterview.fetch method
...
So that we can also fetch the roster also without the controlbox and rosterview.
2016-09-20 17:38:01 +02:00
JC Brand
713922a9e1
Update to Strophe 1.2.8 and add support for SASL-EXTERNAL auth
2016-09-16 13:06:52 +02:00
JC Brand
600f98afcb
Attempt to mitigate against performance degrading attacks.
2016-09-12 13:13:57 +02:00
JC Brand
89e5bd7c54
Update to pluggable.js 0.0.2
2016-08-31 10:39:11 +00:00
JC Brand
66c7c41888
Emit 'roster' event after updating contacts
2016-08-31 09:59:54 +00:00
JC Brand
3c9b5bd7a0
More work on session management.
...
When it's not possible to reconnect due to password no longer being cached,
render the login form.
Fixed a bug whereby after one failed reconnection event, reconnection becomes
impossible (due to 'connection' state of the controlbox).
2016-08-23 18:14:09 +00:00
JC Brand
f5b182c365
Set connected
back to true
after reconnect.
2016-08-23 13:25:34 +00:00
JC Brand
ba67f37473
Only show desktop notifications for error/warn feedback messages
2016-08-23 11:35:16 +00:00
JC Brand
7a428f4dc8
Configure path for almond.js
2016-08-23 09:35:34 +00:00
JC Brand
c65eee9ed3
Use almond.js via npm (instead of bower)
2016-08-23 09:16:12 +00:00
JC Brand
4a2048baae
Found a better way to ensure roster is fetched after reconnecting.
2016-08-23 08:53:37 +00:00
JC Brand
a2ba3ccd4c
Fixed chat state value, should be chat
not chatty
.
2016-08-23 08:43:20 +00:00
JC Brand
c6d37b57e7
Ability to specify both subject and message for feedback messages
...
This allows for better desktop notification messages.
Also improved the wording for some of the feedback messages.
2016-08-23 08:00:41 +00:00
JC Brand
814845e879
Provide a nicer notification when reconnecting
...
after a dropped connection.
2016-08-21 11:17:06 +00:00
JC Brand
b8aaf751d2
Changes concerning caching of data in the browser.
...
- Add new configuration setting messages_storage
- Hardcode the storage for roster contacts and chatroom occupants to `sessionStorage`.
2016-08-21 10:55:45 +00:00
JC Brand
95a0b91afa
Update 'rooms' api to allow user to pass in room attributes.
2016-08-19 17:16:36 +02:00
JC Brand
1ee7d06a08
Further document the auto_reconnect
option
...
and drop the reconnection timeout to 3 seconds (from 5).
2016-08-19 14:11:37 +00:00
JC Brand
59143c1c72
More work on auto-reconnecting and on maintaining sessions.
...
- Added the ability to reconnect to more disconnection causes.
- Make sure the roster is fetched again when reconnecting.
2016-08-19 12:16:55 +00:00
JC Brand
31f0e069ab
Decided to use 30secs instead of 20.
2016-08-18 10:19:43 +00:00
JC Brand
4d28ae3c11
Tweak timeouts regarding status notifications.
...
Send a <paused/> notification after 10 seconds, instead of 20.
Auto-remove a typing notification in the chat box after 20 secs instead of 10.
This is to avoid situations where the status notification gets
auto-removed while the typer keeps on typing without long enough breaks in
between for <pause/> states, thereby causing the recipient to not be aware that
they're still typing.
2016-08-18 09:28:48 +00:00
JC Brand
fdb0425722
Make sure to scroll down after revealing the chat room messages.
2016-08-18 09:08:12 +00:00
JC Brand
6ac4f2601d
Fixes #677 Chatbox does not open after close
...
Problem was a race condition between hide and show methods.
Solution was to not hide the chat box during the initialize method.
2016-08-12 20:38:39 +00:00
JC Brand
4402798dcd
Don't add resources from message stanzas. Fixes #632
...
For each user we keep a list of currently online resources. These resources
were taken from both presence and message stanzas.
Receiving a message doesn't however indicate that the user is online,
especially in the case of archived messages.
This also abused the semantics of messages, which are meant to indicate
user presence.
2016-08-12 19:45:47 +00:00
JC Brand
1f805fa1e2
Fixes surrounding chat state notifications in MUC.
...
- Send chat state notifications with type groupchat for MUC.
- Don't show own chat state notifications if received from the server.
2016-08-12 17:00:15 +02:00
JC Brand
fe46f2ee77
Chat state notifications are now also sent out from chat rooms.
2016-08-12 12:52:33 +00:00
JC Brand
9d28145724
Bugfix. For reserved rooms, only render config form when they're new.
2016-08-12 10:39:57 +00:00
JC Brand
66d80cc4db
New configuration setting muc_instant_rooms
.
...
This option is by default set to `true` which entails no changes in behavior
compared to previous versions of converse.js.
If set to `false`, then rooms first need to be configured before they can be
joined by other users (so-called "reserved" rooms).
More info on "instant" and "reserved" rooms here:
http://xmpp.org/extensions/xep-0045.html#createroom
2016-08-11 16:05:07 +00:00
JC Brand
cd46e96783
Converse.js's plugin architecture has been moved to a separate repo
...
See https://github.com/jcbrand/pluggable.js
2016-08-11 14:05:25 +00:00
JC Brand
34eb8cdfc4
Add getDefaultNickname
method
...
so that plugins can have a different mechanism for determining the default
nick.
2016-08-11 12:19:43 +00:00
JC Brand
462a43b891
Add new config option muc_nickname_from_jid
...
which if set to `true` will let converse.js automatically take the node part of
a user's JID as their nickname when entering a room.
If there is a nickname clash, then the nickname will be disambiguated by adding
integers to it.
For example, john will become john-1, then john-2 and so forth.
2016-08-11 12:02:35 +00:00
JC Brand
561c138edd
Bugfix. Allow multiple MAM queries to be made simultaneously.
2016-07-28 18:01:37 +02:00
JC Brand
e28aba5a59
Fixes #645 . When accepting a contact request...
...
the contact didn't appear under the pending contacts list.
2016-07-28 10:35:43 +00:00
JC Brand
a1e24c95c9
Add nickname to chat message when clicking on room occupant.
...
Allows you to easily mention someone in your message.
2016-07-26 09:31:23 +00:00
JC Brand
0f3526c570
Bugfix. Still render server input field, just make it hidden.
2016-07-26 08:30:26 +00:00
JC Brand
e109c54cf4
Avoid having a separate configuration in demo folder
2016-07-26 08:22:31 +00:00
JC Brand
8a42e241b7
We no longer need to force the user to provide a JID
...
when calling `converse.rooms.open`.
2016-07-26 07:27:28 +00:00
JC Brand
172ce7e0ce
Remove the members-list work and keep the nickname form stuff
...
It's not stable yet and XMPP server support is very patchy.
However, the nickname form work can be merged into master.
2016-07-26 07:14:22 +00:00
JC Brand
0d105b8a6e
make sure room nick is remembered across page loads.
2016-07-26 07:12:56 +00:00
JC Brand
be47ceaab5
In case of a nickname conflict, enable the user to choose a new one
2016-07-26 07:12:56 +00:00
JC Brand
f56b85cff7
Check whether the user has a reserved nickname
...
when they enter a chat room. If they have, we'll use that, otherwise we render
a form where they can specify their nick.
Some chat room tests now fail and still need to be fixed.
2016-07-26 07:12:56 +00:00
JC Brand
cd75b2efab
Let the user choose their nick after opening a chat room
...
This change is with an eye on supporting reserved nicknames, in which case the
user who has a reserved nickname won't have to choose a nick upon joining a
room.
2016-07-26 07:12:56 +00:00
JC Brand
5ffebda8c2
Fix failing tests
2016-07-26 07:12:56 +00:00
JC Brand
c1be16aaab
Bugfix. Store and find occupant views by id, not jid
...
because we don't always have a jid...
2016-07-26 07:12:56 +00:00
JC Brand
93a8dfc024
Indicate whether a room occupant is online or not.
2016-07-26 07:12:56 +00:00
JC Brand
09802cfbde
Add invitees to the member-list of the room.
2016-07-26 07:12:56 +00:00
JC Brand
60f433d12e
Initial work on managing a room's member's list.
2016-07-26 07:12:56 +00:00
JC Brand
88d2142501
Minor improvements around anonymous login.
...
You can now provide the JID of the server either via `converse.initialize` or
via `converse.user.login`.
2016-07-24 10:54:57 +02:00
JC Brand
0c393cf286
Move some utility methods to utils.js
2016-07-18 11:41:31 +00:00
JC Brand
01e10a9b24
Bugfix. Don't call Jed's translate method
...
before converse.initialize has been called. Otherwise we won't get
translations.
Updates #669
2016-07-18 11:34:31 +00:00
JC Brand
71381e2f22
Show requesting contacts when filtering by chat state.
...
Also add an initial test case for filtering by chat state.
2016-07-18 08:42:07 +00:00
JC Brand
7de76924b4
Create the minimized_chats obj during _initialization
...
and don't remove during `_tearDown`.
Fixes bug in `trimChats` when logging in again and `converse.minimized_chats`
is undefined.
2016-07-05 06:21:25 +00:00
JC Brand
5ed8dfbe0a
Get chat box views by id
...
Fixes bug when fetching controlbox, which doesn't have a jid
2016-07-05 07:43:34 +02:00
JC Brand
95d7c306d4
Add more logo sizes, resize and pad.
...
Use the 128x128 icon for Desktop notifications
2016-07-02 13:40:51 +02:00
JC Brand
d6ef4fc5ca
Add method hook for adding more attrs to send to the message template
2016-07-01 14:27:26 +02:00
JC Brand
1666a45c6b
Handle case where this
of overridden method is not the pluggable
...
due for example to it being called by an event handler.
2016-06-30 14:15:05 +02:00
JC Brand
01f576e505
Return all rooms or private chat when caling get
without arguments
2016-06-24 10:54:39 +02:00
JC Brand
be122af3ed
Add tests for rendering of error messages.
2016-06-23 08:56:15 +02:00
JC Brand
e06a34a905
Some initial work on show messages with type "error"
2016-06-22 18:47:07 +02:00
JC Brand
9e8674ef55
Rename ChatBoxView.insertIntoPage
to ChatBoxView.insertIntoDOM
...
to ensure naming consistency, we have the same method on `ChatRoomView`.
2016-06-22 15:54:22 +02:00
JC Brand
081d377881
Move code from plugins to core.
...
Move init of RosterGroups collection and presenceHandler registration out of
the controlbox and rosterview plugins and into core, since this code is
generally useful (indeed necessary) even without those plugins.
2016-06-22 10:25:01 +00:00
JC Brand
9cfec0ba8c
Show requesting contacts at the top of the roster view.
2016-06-21 17:48:18 +00:00
JC Brand
7f753040de
Move roster-related models/collections to core
2016-06-21 17:36:40 +00:00