Commit Graph

390 Commits

Author SHA1 Message Date
JC Brand
0b857011f3 Use "No Password" instead of "Unsecured" 2017-12-20 16:59:17 +00:00
JC Brand
fb35ed844a Avoid flashing when opening chat room. 2017-12-20 11:02:46 +00:00
JC Brand
3f94028377 Speed up rendering of chat boxes by lazily rendering the emoji picker 2017-12-20 11:02:46 +00:00
JC Brand
7ae735c4d0 Better naming and wrap lines 2017-12-18 12:20:39 +00:00
JC Brand
bc6a484467 Remove more jQuery-dependent code from converse-muc 2017-12-15 21:52:14 +00:00
JC Brand
fbc81d30ec Add and document bring_to_foreground option to rooms API 2017-12-15 20:51:07 +00:00
JC Brand
f9343594bf Collapse multiple, consecutive join/leave messages 2017-12-15 16:24:30 +00:00
JC Brand
c874efeb79 Sort chatroom occupants alphabetically and according to role 2017-12-14 18:07:40 +00:00
JC Brand
00708dcfbf Bugfix. Occupants sidebar was toggled incorrectly 2017-12-14 17:30:05 +00:00
JC Brand
23e2aceaca Indicate visitors by making them lighter grey 2017-12-14 13:45:14 +00:00
JC Brand
dc16930464 Test the /voice command and fix a bug 2017-12-14 13:07:39 +00:00
JC Brand
9fca25b6a9 Use snabbdom via backbone.vdomview 2017-12-13 22:04:58 +00:00
JC Brand
bd5a49da3f Show an info message when a MUC occupant is muted. 2017-12-07 07:05:37 +01:00
JC Brand
2b6db9d50b Test /help, /kick and /mute commands 2017-12-06 22:11:53 +01:00
JC Brand
41ca34a051 Fixes #953 MUC "Features" displayed when exiting configuration 2017-12-06 16:39:29 +01:00
JC Brand
85bea60066 Some of refactoring to avoid code duplication and jQuery 2017-12-06 16:26:53 +01:00
JC Brand
063908e032 Append spinner when fetching newer messages 2017-12-02 15:09:04 +01:00
JC Brand
d420a35e91 Merge remote-tracking branch 'weblate/master' 2017-11-23 15:23:06 +01:00
JC Brand
fa7ca46d12 Text fixes based on feedback from translator 2017-11-23 12:10:40 +01:00
JC Brand
cfd5dad9c5 Use [backbone.vdomview](https://github.com/jcbrand/backbone.vdomview)
For the MUCJoinView and the LoginPanel
2017-11-10 22:01:36 +01:00
JC Brand
ed4c393a9d Create separate view for the MUC join form 2017-11-10 21:37:35 +01:00
JC Brand
a6f2877ed9 Disco API refactoring
This came out of the desire to let `converse-muc` use the API to
determine whether MUC is supported. However, we don't know the entity
JID before hand and I couldn't think of a good way to query all current
and future entities for a feature.

So `converse-muc` still does it's own thing without the API, but some
refactoring came as a result of attempting.
2017-11-10 21:37:35 +01:00
JC Brand
8a4aa4efdd Use a named variable for _.template
This removes the need for `switch (obj)` in the template which is not
allowed in strict mode.

Additionally using a named variable speeds up rendering.
2017-11-05 18:59:29 +01:00
JC Brand
3514d6d56b fixes #316
- Also allow private chats to be opened via URL fragment.
- Make sure to clear the URL fragment when the relevant chat is closed.
2017-10-31 23:11:27 +01:00
JC Brand
985cf6c294 Use global router to open chat rooms 2017-10-31 22:08:06 +01:00
JC Brand
35db952e71 Make openChatRoom a closured function 2017-10-31 22:07:40 +01:00
JC Brand
61ed55dbaa Rename login and register urls 2017-10-31 20:39:44 +01:00
JC Brand
20f3172f5e Add fixme note 2017-10-24 11:07:58 +02:00
JC Brand
724e66d0e5 Initial code for opening a room via URL 2017-09-29 00:07:16 +02:00
JC Brand
80b3692131 More work in removing locales from builds 2017-09-26 18:27:41 +02:00
JC Brand
f0debc61ab Refactor i18n so that only relevant translations are fetched
instead of bundling all translations in the dist file.
2017-09-25 12:49:10 +02:00
JC Brand
937b310733 Refactor login form to make it more reactive. 2017-09-24 00:30:43 +02:00
JC Brand
b9b9689668 Fixes #912 maximize method in converse-minimize fails...
if the `controlbox` is not there.

Also, make `converse-controlbox` and `converse-muc` optional dependencies of
`converse-minimize`.
2017-08-29 12:21:53 +02:00
lduburas
eef483cb4d Fix regarding ChatRoomView.getDefaultNickName() and muc_nickname_from_jid (#911)
* ChatRoomView.getDefaultNickName() when muc_nickname_from_jid  is used

Allows to overridde nickname by plugins when muc_nickname_from_jid is used.

* CHANGES.md updated
2017-08-28 09:27:59 +02:00
JC Brand
32d574039d Translateable strings must not be template literals
xgettext doesn't support them yet, which causes errors in the pot/po files.

https://savannah.gnu.org/bugs/?50920

updates #909
2017-08-23 12:00:49 +02:00
JC Brand
56c5a9c8d0 Move form utilities to form-utils.js 2017-08-16 15:19:41 +02:00
JC Brand
add3b8efb3 utils now no longer depends on jquery. 2017-08-16 09:05:15 +02:00
JC Brand
3afe5eb8f3 Run the lodash converter only once. 2017-08-15 16:46:55 +02:00
JC Brand
e4d95eb794 Don't load lodash.fp in converse-core. It's not being used there. 2017-08-15 16:36:43 +02:00
JC Brand
38f8724dd9 roomslist: Add ability to add or remove bookmarks 2017-08-09 15:50:24 +02:00
JC Brand
805db75e10 Bugfix. Handle case where there's no room data 2017-08-08 16:27:07 +02:00
JC Brand
59edcb2393 muc: Add JID validation to the occupant invite form 2017-07-21 19:53:57 +02:00
JC Brand
de7a1f7545 Check specifically for the Slack identity when working around its quirks 2017-07-21 17:58:46 +02:00
JC Brand
084d9914b0 muc: Refactored how MAM messages are fetched.
Listen for the `afterMessagesFetched` event.
Wait until `discoInitialized` before fetching.
Add `fetchArchivedMessagesIfNecessary` method(s).
2017-07-21 15:09:50 +02:00
JC Brand
7850c38faa disco: Create new plugin converse-disco.
We can now support feature discovery for multiple entities (although we
currently still only query for the user's own XMPP server).
2017-07-21 15:09:50 +02:00
JC Brand
0edb38e2c6 Fixes #896 Consistently use XMPP username in user facing text 2017-07-19 09:17:46 +02:00
JC Brand
f84790e68c muc: Show JID (instead of only server) in room info
Also made some styling changes and tweaked the room head to better
differentiate between the Name and JID of a room.
2017-07-19 08:30:04 +02:00
JC Brand
c012c2c1af Don't show duplicate sent groupchat messages in Slack chat rooms 2017-07-19 08:28:51 +02:00
JC Brand
496d2521fc muc: Show room domain in header.
Also make sure room name gets saved once it's been updated.
2017-07-17 18:07:31 +02:00
JC Brand
ffdd4e25f3 emoji: remember category and skin tone selection 2017-07-16 14:12:17 +02:00
JC Brand
1dfdba0db9 muc: Ignore non-MUC (like error) messages
Noticed that Slack sends error messages back in response to chat state
notifications.

We're not doing anything with them currently and they bloat the sessionStorage
2017-07-16 12:51:20 +02:00
JC Brand
4ea50de927 Use emoji instead of emoticon 2017-07-15 15:14:47 +02:00
JC Brand
67578c9747 Merge branch 'master' into emoji 2017-07-15 07:16:37 +02:00
JC Brand
397927b189 Fix broken tests and update changelog 2017-07-12 09:58:14 +02:00
JC Brand
6ef0536e31 Some work on using es6 promises 2017-07-10 21:14:48 +02:00
JC Brand
9a9eae3fcf Use esnext to auto-generate es2015 syntax 2017-07-10 17:46:22 +02:00
JC Brand
40e7ee1ae6 Initial stab at using ES2015
Mostly replaced ``var`` with ``let`` and ``const``.
Also added a few arrow functions.
2017-07-10 12:49:20 +02:00
JC Brand
2d89589b54 bookmarks: clear the fetched_flag upon logout 2017-07-10 10:43:37 +02:00
JC Brand
5ab1693136 logging: Add deprecation warning for updateSettings
and also use the Strophe.LogLevel levels for logging in general.
2017-07-05 11:33:55 +02:00
JC Brand
f81a94baf1 Move updateSettings to the private API.
Also add an API method for exposing new promises.

Update the plugin and API documentation, specifically concerning the above
changes.
2017-07-05 11:03:13 +02:00
JC Brand
c11a1b40e8 muc: bugfix, presence referring to current user doesn't have a jid attr 2017-06-27 12:56:50 +02:00
JC Brand
ea04b11724 Try to fix what appears to be a timing bug 2017-06-27 09:29:46 +02:00
JC Brand
4e467044d3 Some usability fixes around the toolbar and emojis 2017-06-24 11:34:01 +02:00
JC Brand
70f56b31f4 Merge branch 'master' into emoji 2017-06-24 11:04:19 +02:00
JC Brand
66fd9a9f28 muc: Fix: after reconnecting, already open room didn't receive new messages 2017-06-23 20:19:38 +02:00
JC Brand
36e078c9f6 utils: Rename saveWithFallback to safeSave 2017-06-23 20:17:58 +02:00
JC Brand
86c20ce2a7 muc: When exiting, don't wait for confirmation before cleaning up
During logout we don't have enough time.
2017-06-23 18:22:19 +02:00
JC Brand
02e5921415 Fix problem of stuck/hanging tests on TravisCI 2017-06-19 15:05:22 +02:00
JC Brand
ca53a8d8ef Add support for Emojis 2017-06-17 01:01:52 +02:00
JC Brand
d527f693c2 Updates #890 Destroy and recreate session upon reconnection
This ensures that carbons will be activated again.
2017-06-15 17:30:26 +02:00
JC Brand
9ee5550cde inverse: bugfix, when reloading, hidden auto-joined room was displayed 2017-06-15 16:22:49 +02:00
JC Brand
e29c2f8197 muc: render tab upon chatroom add
So that it shows unread messages upon page reload.
2017-06-15 12:32:33 +02:00
JC Brand
1f82b7dfe4 Create utils method isSameBareJID. Refs: #894 2017-06-14 22:31:44 +02:00
Antonio Zoccoli
ad06c2b9cc Converse ryzen 894 (#895)
* added change #894

* #894 - fix jid comparison in setAffiliationAndRole
2017-06-14 22:20:46 +02:00
JC Brand
6c262f7213 Various small changes to reduce (non-critical) errors during testing 2017-06-14 20:14:45 +02:00
JC Brand
076af0970f Make spinner into a template 2017-06-14 19:43:02 +02:00
JC Brand
2d4159802e Bugfix. Don't override defaults for ChatBox 2017-06-13 18:22:19 +02:00
JC Brand
8191d5e83a muc: Rename `createChatRoom to openChatRoom`
It doesn't always create a new room.
2017-06-13 18:22:19 +02:00
JC Brand
d1bafdb38a Re-render only the tab when num_unread changes. 2017-06-09 23:45:54 +02:00
JC Brand
f9fb13a71d muc: Make defaults a function
otherwise also the prototype's defaults gets overwritten.
2017-06-07 17:47:50 +02:00
JC Brand
b5ecc1fc6a Expose the fp version of lodash via the API 2017-06-07 09:15:22 +02:00
JC Brand
a128a70d41 Discriminate between which unread messages to indicate per tab 2017-06-07 00:55:57 +02:00
JC Brand
5949ca9e36 Show number of unread messages on the "Rooms" tab 2017-06-05 14:52:24 +02:00
JC Brand
86dc3800aa Render nickname form when entering a room via invitation 2017-05-24 17:18:54 +02:00
JC Brand
c83026e5a8 muc: Differentiate between generally unread messages and unread mentions 2017-05-24 08:40:09 +02:00
JC Brand
a4284e48f7 Use proper message handler. Fix typo 2017-05-23 18:49:04 +02:00
JC Brand
7df2d36e42 We now have a separate Backbone.Model for chat rooms
Also... `num_unread` is now updated for groupchat messages in which the user is
mentioned.
2017-05-23 18:40:55 +02:00
JC Brand
5e783e70e4 Lay the groundwork for being able to have separate ChatRoom models 2017-05-23 18:16:47 +02:00
JC Brand
501c9f5e97 muc: Extract code into separate method renderRoomsPanel 2017-05-16 11:55:59 +02:00
JC Brand
3835ab7af6 bookmarks: Don't autojoin rooms prematurely
by first waiting until chatboxes have been fetched as well.
2017-05-08 21:28:56 +02:00
JC Brand
d81d62f98d muc: check for browserStorage attr instead of whether connected 2017-05-08 21:28:56 +02:00
JC Brand
47ca3e64b2 Emit new event roomsPanelRendered 2017-05-08 21:28:56 +02:00
JC Brand
f3d29e016e Show unread messages counter next to roster contacts 2017-04-24 15:57:22 +02:00
JC Brand
bc1fa24315 Show the MUC server in a bookmarked room's info view 2017-04-21 19:05:10 +02:00
JC Brand
6af4480c14 Render disconnect message via template and add padding. 2017-04-21 18:26:59 +02:00
JC Brand
3ea43c6a0f Use noConflict to avoid polluting globale namespace
with lodash and Backbone.
2017-04-21 18:06:27 +02:00
JC Brand
9f28728e61 Updates #849. Don't call when no connection present 2017-04-19 14:47:18 +02:00
JC Brand
1b38967d19 Updates #842 Persistent muc room creation not working 2017-04-13 11:19:24 +00:00
JC Brand
de2f33f333 Send button must be translateable and should type "submit" 2017-04-11 07:32:17 +00:00
JC Brand
d0f9f15d60 Bugfix. Prevent bypassing of password form via bookmark form
Not a security hole, but a UX issue.

Also... don't render artifacts before rendering the nickname form.
2017-04-04 14:45:50 +00:00
Marc Laporte
d83f64bcc9 Improve spelling (#836) 2017-04-04 09:11:55 +02:00
Anshul Singhal
99647438ac Adds the send button at bottom of chatbox (#796)
Fixes #796 New config option: `show_send_button`

* Adds show_send_button setting to docs

* Change log updated

* Improves send button CSS, style fixes and documentation corrections

* Adds missing setting in rendering template for headlines
2017-03-30 12:40:17 +02:00
JC Brand
6e94e11dcc Fixes #820. Inconsistency in displaying room features 2017-03-19 18:23:02 +00:00
JC Brand
9214c81bbc Updated po files. 2017-03-15 11:02:25 +00:00
JC Brand
f1bf5a9654 Fixes #807
- Document `optional_plugin_dependencies`
- Also make `converse-headlines` an optional dependency of `converse-dragresize`
2017-03-08 11:36:46 +00:00
JC Brand
741f2a6b9a Make sure the occupants height is set after transition 2017-03-05 10:33:20 +00:00
JC Brand
e1e20690f0 muc: the original stanza must be emitted
Otherwise other plugins don't know whether the message was forwarded or not.
2017-03-03 14:44:04 +01:00
JC Brand
62c8177142 Bugfix.
After bookmarking a room for which a nickname is required, return to the nickname form.
2017-03-02 23:28:22 +01:00
JC Brand
a5c0d5c451 Wrap long lines. No need for that 2017-03-02 23:06:40 +01:00
JC Brand
a895c91f14 Programmatically set the occupants height
since I couldn't find a way to do this with only CSS.
2017-03-01 08:42:26 +01:00
JC Brand
78865bbccb Don't show the features heading if we don't know of any 2017-02-28 22:34:16 +01:00
JC Brand
a3407bb98b Move MAM specific code to converse-mam.js 2017-02-28 22:34:04 +01:00
JC Brand
dc8cbc6104 3 changes
- immediately show chat box (sometimes fetching features takes long)
- add timeout for fetching features
- don't register scroll handler twice for chat rooms.
2017-02-28 17:25:33 +00:00
JC Brand
bccdedc64f Also show a hint explaining the roomchat status 2017-02-28 06:52:33 +01:00
JC Brand
f20d391ea6 Show chat room occupants' states. 2017-02-28 05:28:09 +00:00
JC Brand
f2f05ff484 MUC: Don't show duplicate join messages. 2017-02-28 05:02:36 +00:00
JC Brand
f8d9368163 MUC: only render and listen to 'scroll' event...
after the cached messages have been fetched.
2017-02-27 21:09:17 +00:00
JC Brand
adeac37b5c Move more features HTML to chatroom_features.html 2017-02-27 17:59:33 +00:00
JC Brand
946a240080 Make sure to show the invite widget
when the room features change.
2017-02-27 17:56:40 +00: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
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
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
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
fe6cb93a63 MUC: don't send out chat hints before join or after leave 2017-02-17 22:17:19 +01:00
JC Brand
a033899946 Fix leaky abstraction of MUC 2017-02-15 20:30:32 +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
d2227c8d44 Replace typeahead with awesomplete.
Much smaller library.
No dependence on jQuery.

Updates #779
2017-02-14 12:26:56 +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
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
85f6a75fed Escape user-generated input to avoid injection attacks 2017-02-13 13:41:37 +00:00
JC Brand
63888dd454 Fix failing tests 2017-02-02 21:55:05 +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
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