Commit Graph

697 Commits

Author SHA1 Message Date
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