Commit Graph

117 Commits

Author SHA1 Message Date
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
2a81d2e6f3 converse-mam: Don't fetch MAM messages on each page load. 2016-12-04 14:45:36 +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
9edc97101b Don't maximize minimized rooms when calling rooms.open 2016-11-30 11:03:28 +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
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
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
d26d41a701 Use 'hidden' class instead of .hide(). Fixes #706 2016-11-07 14:10:39 +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
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
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
a09db2746c Only set muc domain once connected 2016-10-27 10:08:05 +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
623c56c89f Minor refactoring.
Split showRoomInfo into two new methods.
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
f60ee4d640 Refactor rooms to have separate handlers for presence and message stanzas 2016-10-13 18:22:37 +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
052dd19252 Initial work on adding chatroom bookmarks. 2016-10-05 23:15:42 +02:00
JC Brand
90d1071df0 Load templates in the respective plugins 2016-09-23 12:35:01 +02:00
JC Brand
89e5bd7c54 Update to pluggable.js 0.0.2 2016-08-31 10:39:11 +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
fdb0425722 Make sure to scroll down after revealing the chat room messages. 2016-08-18 09:08:12 +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
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
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
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