JC Brand
d6b5ed5e1e
Handle case where locales is not defined.
2017-01-16 22:07:58 +01: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
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
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
f0a454561b
converse-core: Properly disconnect if reconnection attempt fails.
2016-12-04 15:00:46 +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
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
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
9bf00241de
Updates #721 Restore sessions when logging in anonymously
...
together with keepalive.
2016-11-07 18:48:49 +01: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
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
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
e63853ee92
Add a logout
event.
...
updates #714
2016-11-02 08:42:24 +01: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
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
a51d503ea5
Remove invalid comment
2016-10-20 12:31:15 +00:00
JC Brand
0fe4031a1b
Close all chat boxes when disconnected (with no reconnection attempt)
2016-10-18 11:34:46 +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
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
6972066076
Bookmarked rooms will now be automatically opened
...
If configured for it.
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
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
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
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
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
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
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
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
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
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
e06a34a905
Some initial work on show messages with type "error"
2016-06-22 18:47:07 +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
7f753040de
Move roster-related models/collections to core
2016-06-21 17:36:40 +00:00
JC Brand
705c043852
Fixes concerning tab visibility
2016-06-17 09:30:47 +00:00
JC Brand
10ca2900d4
Add a "create" parameter to rooms.get
...
to indicate whether the room should be created if not found.
2016-06-17 09:30:31 +00:00
JC Brand
95c5f9d420
Better support for checking whether the page is visible or not.
2016-06-16 16:14:22 +00:00
JC Brand
e12c165454
Add new event pluginsInitialized
and use it in converse-notifications
...
By listening for this event before registering event handlers, other plugins
can first get their overrides of those handlers applied.
2016-06-16 17:21:49 +02:00
JC Brand
1bf8b80cec
Refactored converse-pluggable to remove all deferreds
...
by not attempting to load `optional_dependencies` via require.js.
Instead, we just expect them to be plugins and to have been loaded already.
2016-06-10 08:26:38 +00:00
JC Brand
454f8ef034
Let converse.initialize return a deferred
...
and use that in the tests, instead of a callback.
2016-06-10 08:26:38 +00:00
JC Brand
62c170273e
Allow plugins to have optional dependencies.
...
This change refactors out the plugin code from converse-core into
src/converse-puggable.js
Additionally, plugins now have an optional attribute `optional_dependencies`
which is an array of dependencies which are "nice-to-have" but not essential.
Work has also been done to ensure that a plugins' dependencies are first loaded
before the plugin itself.
2016-06-10 08:26:29 +00:00
JC Brand
eb3252542e
Split showChat into two methods to allow easier overriding.
2016-06-06 07:50:10 +00:00
JC Brand
5b80d67a98
Return before trying to extend the object
...
when strict_plugin_dependencies is set to `false`.
2016-06-03 19:25:09 +02:00
JC Brand
f60a0512d9
Emit an event when the roster is fetched from the cache
...
We already emit an event when the roster is fetched from the XMPP server,
similarly, it would be useful to know when the roster was instead fetched from
the cache.
2016-06-01 16:04:06 +00:00
JC Brand
f9528e7144
Pass the jid to restore
...
if it's defined, then we want the extra check that the jids match, otherwise
we might be attaching to someone else's session.
2016-05-31 12:25:09 +00:00
JC Brand
0002c0bd53
converse._tearDown
shouldn't be called from converse-controlbox.js
2016-05-31 10:24:22 +00:00
JC Brand
7398d41405
Some improvements to constructPresence
...
Don't <show> 'offline'.
Only include status_message when explicitly passed in as a string.
2016-05-31 09:40:18 +00:00
JC Brand
f70a3c3ed2
Add new configuration variable: default_state
2016-05-31 09:37:42 +00:00
JC Brand
6bfcce5fcb
Don't ignore incoming messages from current JID
...
they might be MAM archived messages.
Fixes #650
2016-05-30 17:30:14 +00:00
JC Brand
2b88db812d
Don't show "new messages" indicator for archived messages
2016-05-30 17:18:07 +00:00
JC Brand
bd23a7751a
Add processing hints to OTR messages
...
so that they're not stored in MAM and not forwarded.
updates #553
2016-05-30 16:52:26 +00:00
JC Brand
5993fba1d4
Fix MAM issue. Messages weren't being queried for properly
...
because the archive ids of messages weren't being stored.
2016-05-30 16:19:05 +00:00
JC Brand
c738d085c4
Indicate to the user when there are unread messages
...
further down in the chat box.
2016-05-28 10:07:11 +00:00
JC Brand
82ee7f694e
Don't ignore messages sent to different resource
...
But make this behavior configurable. Updates #647
2016-05-28 06:36:24 +00:00
Kamran
b82e0f3136
Fix for issue #648 ( #649 )
...
* Updated onDisconnected method to fire disconnected event. Issue #648
* Updated docs/CHANGES.md
2016-05-28 00:31:58 +02:00
JC Brand
e923fbf2d1
Set i18n to empty obj in cases where there's no locales
...
This lets variable interpolation still work (if Jed is loaded)
2016-05-26 13:02:53 +02:00
JC Brand
29c2a96481
Bot message doesn't appear when it has the same id as its command
2016-05-25 07:54:58 +00:00
JC Brand
cb288341fb
Bugfix. Login form doesn't render after logging out
...
when auto_reconnect = false
2016-05-24 09:03:41 +00:00
JC Brand
c8e4ae13ea
No need to explicitly send unavailable presence, Strophe does it for us.
2016-05-24 08:06:38 +00:00
JC Brand
0d2e49a976
Bugfix. Don't hide the roster filter when it's actually being used
...
The filter was being hidden if the roster was not big enough to require a
scrollbar, but the roster might not be big enough because the roster is
actually being applied.
2016-05-24 07:58:54 +00:00
JC Brand
a2e465f49f
Send presence of type 'unavailable' when logging out.
2016-05-23 09:48:51 +00:00
JC Brand
e0c6626c6f
Add deprecation warnings for events that will be removed.
2016-05-23 09:48:26 +00:00
JC Brand
af89109670
Bugfix. Flush connection just after connection.
...
Solves a weird problem I've encountered with PubSub and Prosody, whereby a
returned HTTP response is not received by the browser. Underlying cause is
still unknown, but is BOSH related and it appears to be that the HTTP request
being responded to by Prosody is no longer open/valid.
2016-05-11 09:10:27 +00:00
JC Brand
218000551d
Add the ability to replay transcripts of chat logs.
2016-04-28 14:58:09 +00:00
JC Brand
d2ee62da71
Make sure that there is a valid connection when login API is called
...
In the process I had to refactor some methods which required the mock
connection of tests to be changed as well.
2016-04-13 15:11:50 +00:00
JC Brand
a969d010cb
Don't try to reconnect on auth fail.
2016-04-13 12:09:16 +00:00
JC Brand
e09328df6a
Add login
API method.
2016-04-13 11:52:28 +00:00
JC Brand
0564f0f592
Handle case were connection is not defined.
2016-04-13 10:09:47 +00:00
JC Brand
aee232421c
Properly tear down when logging out or disconnecting.
...
Remove interval handler and the user activity handler.
Make sure the connection is reset when logging out.
Also removed the reconnectTimeout, instead debounce the reconnect method by 1 second.
2016-04-08 09:02:06 +00:00
JC Brand
94693f2d02
Some refactoring to fix issues with how/when chat rooms are shown
...
- Don't call show in a room's initialize method (instead let the code be more
similar to normal chats, in that it should listen to the "show" trigger).
- Rename chatBoxShouldBeShown to chatBoxMayBeShown
- Implement auto_join for rooms only once boxes have been fetched already.
2016-04-05 11:23:16 +00:00
JC Brand
8e0f8f0a6d
Add the ability to filter contacts by chat state.
...
The roster filter is now also remembered across page loads.
2016-04-02 11:30:54 +00:00
JC Brand
885c553e2e
Bugfix. Login panel wasn't being rendered after logging out
2016-04-02 03:43:04 +00:00
JC Brand
a6c3b46237
Move the drag-resize code into a separate component.
2016-04-01 12:46:19 +00:00
JC Brand
1fbc7e0f3b
Use attemptNonPreboundSession for reconnections.
...
Fixes reconnects for certain usecases not yet covered.
2016-03-31 13:11:31 +00:00
JC Brand
e0d1a32fdb
Attempt to reconnect when authfail happens
...
and auto_login is true and credentials_url is set.
Trying to handle the case where tokens are used for credentials_url (and the
token is expired).
Not yet 100% happy with this implementation.
2016-03-31 12:32:11 +00:00
JC Brand
6b3fbc9998
Give feedback of error messages via Desktop notifications
2016-03-31 12:25:38 +00:00
JC Brand
2cbf20c6db
Add the ability to fetch credentials for auto_login
...
via the new config option credentials_url
2016-03-31 08:38:43 +00:00
JC Brand
556d264747
Remove "optimization" code no longer used or relevant.
2016-03-29 11:50:50 +00:00