JC Brand
1ef29bee4e
Use composition instead of overrides
2019-05-24 16:02:07 +02:00
JC Brand
b876500865
Update to latest backbone.overview
2019-05-23 14:44:10 +02:00
JC Brand
53520317fc
Move locked_muc_domain
and muc_domain
to model
2019-05-21 13:05:58 +02:00
JC Brand
1269d53e02
Move enterRoom
method to the model
2019-05-21 12:04:55 +02:00
JC Brand
bb0c0fcd81
Remove message views when messages get reset
2019-05-21 09:56:27 +02:00
JC Brand
7e515dd4b1
Move all MUC joining logic to the model
2019-05-20 10:06:37 +02:00
JC Brand
39363d495f
Fetch messages in MUC model
2019-05-20 09:25:11 +02:00
JC Brand
46fef28601
Clear messages when closing a chat
2019-05-19 22:11:37 +02:00
JC Brand
7950f7c2ac
Change muc_show_disconnection_status
to muc_show_join_leave_status
2019-05-18 06:34:29 +02:00
JC Brand
a0f1a5cfaf
Fetch chat messages in the model, not the view
2019-05-17 14:45:37 +02:00
JC Brand
ceb9d12957
Don't store ChatRoomOccupants on ChatRoomView
...
Helps with enforcing discipline of keeping them separate
2019-05-15 15:55:47 +02:00
JC Brand
7cd69726a8
Loosen coupling between ChatRoomOccupantsView and ChatRoomView
...
Hide/show the sidebar based on state and not imperatively in ChatRoomView
2019-05-15 14:50:12 +02:00
JC Brand
1bc425e596
Fetch cached occupants in the model instead of the view
2019-05-15 09:34:52 +02:00
JC Brand
69e8b071d8
Minor cleanups
2019-05-14 20:31:43 +02:00
JC Brand
1d9e1a62df
Only show new moderator status when not already admin or owner
2019-05-14 13:55:19 +02:00
JC Brand
14708af715
Refactor callback method into instance method
2019-05-14 13:54:19 +02:00
JC Brand
d0ddda8244
New config option muc_show_disconnection_status
2019-05-14 13:29:43 +02:00
JC Brand
6193a9dc80
Replace lodash methods with native ones and remove lodash.fp
2019-05-14 12:41:47 +02:00
JC Brand
d91a5ca6de
Remove alias for xss
. Upgrade pluggable.js to version 2.0.1
2019-05-13 18:54:00 +02:00
JC Brand
c520a4e39b
Trim nickname
2019-05-08 21:37:47 +02:00
JC Brand
c3dac272f8
Replace moment with DayJS
2019-05-06 14:27:18 +02:00
JC Brand
9528276be2
Use native Date methods instead of moment
...
- Use native `getTime` method instead of moment's `valueOf`
- Use toISOString() instead of moment().format()
This makes the code timezone independent since we're now globally using UTC.
2019-05-06 10:28:03 +02:00
JC Brand
3290d6659f
Bugfix. validation message should be set on the model
2019-05-02 14:53:07 +02:00
JC Brand
ba6de8844e
Use Object.keys instead of _.keys
2019-04-29 09:29:40 +02:00
JC Brand
34469425d6
Use Object.assign instead of _.extend
2019-04-29 09:07:15 +02:00
JC Brand
dedede56f8
Rename muc_disable_moderator_commands
to muc_disable_slash_commands
...
Since those commands aren't only about moderation
2019-04-25 11:32:07 +02:00
JC Brand
c72dc74022
In the menu, only show allowed commands
2019-04-25 10:48:33 +02:00
JC Brand
3bd9e09fd7
Don't wipe the nickname value when rerendering the form
...
Ideally Snabbdom wouldn't completely replace the input when we add the
`error` class, because that's what's causing the input value to be
cleared.
2019-04-25 08:35:44 +02:00
JC Brand
3ad93b56b3
Clicking the wrench icon again closes the config form
2019-04-24 14:51:12 +02:00
JC Brand
d311e14013
Render MUC forms with Backbone.VDOMView
...
That way we don't lose the user's input values, we avoid flashing and we
avoid unnecessary rendering.
In the process, fixed an annoying issue where Chrome auto-completes
what it thinks is the username into the "Language Tag" field of the MUC
config form.
Instead we tell Chrome that the MUC JID is the username, thereby also
letting it save the password to to that JID.
2019-04-24 14:51:12 +02:00
JC Brand
725a382e3b
Refactor initialization and defaults for chat boxes
...
- Let box_id start with char for valid HTML.
- No need to use SHA1 for box id
- No need for the user_id attribute.
- Set nickname when we set the roster contact.
Also...
- _converse.api.contacts.get is now async
- _converse.api.chats.create is now async
2019-04-18 16:14:51 +02:00
JC Brand
b593b8deb6
Fixes #1533
...
Users can only be muted in moderated rooms
2019-04-11 23:10:57 +02:00
JC Brand
f84c201437
Hide the textarea when a user is muted in a groupchat
2019-04-11 01:40:16 +02:00
JC Brand
e987214555
For roomspanel, don't set muc_domain
if its locked
2019-04-05 13:14:57 +02:00
JC Brand
a45bd8d14b
Convert older docstrings to JSDoc syntax
2019-03-30 12:54:56 +01:00
JC Brand
f897703565
Rename emit
to trigger
for consistency with Backbone.Events
2019-03-29 21:56:56 +01:00
JC Brand
f6335dcabe
Document fired events with JSDoc
2019-03-29 21:04:33 +01:00
JC Brand
d41a7a14c3
Use API to emit and listen to events
2019-03-29 14:16:07 +01:00
JC Brand
b726a2353c
Remove Awesomeplete in favor of _converse.AutoComplete
2019-03-28 12:43:34 +01:00
JC Brand
616731b323
Don't show MUC domain if locked_muc_domain
is set to 'hidden'
2019-03-27 13:13:07 +01:00
JC Brand
9f290dab25
New config setting locked_muc_nickname
...
When set, the "Nickname" field won't be shown in the "Add groupchat"
modal and instead the nickname will be automatically set (based on other
config settings).
2019-03-26 13:29:33 +01:00
JC Brand
32f0eb5488
Fixes #1407 . Don't allow empty value for MUC nickname
2019-03-26 13:03:42 +01:00
JC Brand
a9ce9acff2
Make sure nickname
config option takes precedence
...
above other nickname sources.
2019-03-26 11:31:11 +01:00
Christoph Scholz
0957b7086f
Don't prompt for reason if auto_join_on_invite
2019-03-19 22:26:42 +02:00
JC Brand
11c1b01692
Add converse-headless.js dist file and recipes
...
updates #1352
2019-03-15 10:24:39 +01:00
Christoph Scholz
37800d92d3
allow drag & drop also in MUCs
2019-03-05 18:21:07 +01:00
JC Brand
0ebfc3fce8
Let converse-autocomplete also be triggered with backspace
2019-03-05 17:59:22 +01:00
JC Brand
7910447cf6
Use ev.key
instead of ev.keyCode
...
Removes the need for maintaining a map of keycodes to keys
2019-03-05 17:59:22 +01:00
JC Brand
f8e31a7b49
Update converse-autocomplete to make it more flexible
...
* Accepts other triggers besides tab or @
* More finegrained control over whether the triggering char is
included in the returned value or not.
2019-03-05 17:59:22 +01:00
Emmanuel Gil Peyrot
3aa9ee1ba0
Replace http: with https: in xmpp.org links
2019-03-04 17:49:44 +01:00
Emmanuel Gil Peyrot
b7ae9f212c
Replace http: with https: in conversejs.org links
2019-03-04 17:47:45 +01:00
JC Brand
d3a4555165
Re-add support for muc_domain
and add locked_muc_domain
.
...
updates #1373
2019-02-26 11:58:01 +01:00
JC Brand
2ddd918f6a
Fixes #1437 . List of groupchats doesn't scroll
2019-02-26 11:57:36 +01:00
JC Brand
0ee08ee622
Use async/await for enterRoom
2019-02-22 23:14:35 +01:00
JC Brand
bfaa7e47f2
Add roomviews.get API method
2019-02-22 21:44:03 +01:00
JC Brand
0fc5112000
Found one more occurance of the word room
2019-02-22 21:44:03 +01:00
JC Brand
ce2ae87df2
Bugfix. Open groupchats not shown when logging in after disconnection
...
* Replace `tearDown` overrides with event handlers.
* Move presence listeners to `connected` event handler, otherwise they
don't get called when logging in again after disconnection.
* Add `clearSession` listeners to clean up upon disconnection.
* Use `Promise.all` instead of listening for multiple events.
2019-02-20 23:08:27 +01:00
JC Brand
4463b44773
Use "XMPP address" instead of "XMPP username"
2019-02-19 15:00:38 +01:00
JC Brand
c026dc8a86
New copyright year
2019-02-18 20:23:18 +01:00
JC Brand
9233087548
Don't hash web storage ids.
...
Makes debugging more difficult and uses up extra CPU cycles for no real security benefit.
2019-02-18 20:23:18 +01:00
JC Brand
af0093bd39
Bugfix: MUC invite form not shown
2019-02-18 15:42:56 +01:00
Christoph Scholz
5e1f5785f9
fix moderator commands that change affiliation
2019-02-05 12:47:53 -07:00
Christoph Scholz
b667eae1c8
muc moderator commands can be disabled selectively
2019-01-30 03:42:12 +01:00
JC Brand
10f629310e
Need to declare muc_show_join_leave
as setting
2019-01-29 05:50:43 +01:00
Holger Weiss
af091faf33
Resurrect muc_show_join_leave option
...
The option got lost in commit 9528d81c00
.
Fixes #1263
2019-01-29 05:45:35 +01:00
Christoph Scholz
84be0fb9f7
new config option "roomconfig_whitelist"
2019-01-12 21:51:47 +01:00
JC Brand
a4d608dcdf
Save room features in separate model
...
As a namespacing mechanism to avoid clashes.
Fixes bug where two chats are shown as currently being active in the rooms list.
2019-01-10 12:15:59 +01:00
JC Brand
0c1363c103
The hide_muc_server
option no longer exists
2019-01-03 14:12:36 +01:00
Christoph Scholz
eacd7fd933
implement /destroy command in muc
2019-01-03 13:09:13 +01:00
JC Brand
82bfe66cac
Simplify setting of MUC features.
...
We don't need an event handler that sets the "opposite" features to
false if we set all features properly in getFeatures
2018-12-17 15:18:20 +01:00
JC Brand
b7c01993b7
User-facing term is "groupchat", not "room"
2018-12-16 11:22:12 +01:00
JC Brand
ccb8662ef7
Bugfix. First match for MUC commands
2018-12-10 15:40:30 +01:00
JC Brand
01c3d35db2
Remove unnecessary webpack aliases
2018-11-15 11:29:28 +01:00
JC Brand
5e7d5d7fb1
Add own class and style for controlbox heading buttons
2018-11-07 11:11:20 +01:00
JC Brand
2cfea7cb51
Add description for translateable text
2018-10-28 23:24:33 +01:00
JC Brand
6a87caad6e
Don't use template literals for translated strings
2018-10-27 23:12:17 +02:00
JC Brand
11ac846b31
Fixes #1259
2018-10-27 22:56:05 +02:00
JC Brand
36f63d9000
Fixes #1272 Hiding MUC occupants leaves a blank space
2018-10-26 16:37:56 +02:00
JC Brand
b05b57192d
In these two cases I prefer explicit Promise callbacks
...
In both cases we need the `catch` statement due to the fact that a
sendIQ call gets made which rejects for error stanzas (and I find the
Promise form much compacter).
Additionally, we don't want to hold up subsequent execution until
the element has been faded out.
2018-10-25 23:08:19 +02:00
JC Brand
55fce912df
Merge branch 'master' into async-await
2018-10-25 18:36:04 +02:00
JC Brand
c583678c86
Use _coverse.api.sendIQ
instead of _converse.connection.sendIQ
...
So that we know an event will be emitted when the stanza is sent.
2018-10-25 18:29:29 +02:00
Emmanuel Gil Peyrot
35b7dbe389
Convert a few functions to async/await.
2018-10-24 21:23:32 +02:00
JC Brand
7b2d64b066
Use _converse.api.send
instead of _converse.connection.send
...
so that we can emit an event when sending a stanza.
2018-10-23 16:06:43 +02:00
JC Brand
6904f9a897
Use es2015 modules instead of UMD
2018-10-23 12:25:58 +02:00
cmrd Senya
8ba8eb02fa
Update main converse.js package to use @converse/headless
...
* Update moved dependencies references to @converse/headless
* Remove unused webpack resolve aliases
2018-10-22 12:44:38 +02:00
JC Brand
e181aaf99b
Make the message view's render
method async
...
So that we first render dynamic content (e.g. images) before inserting
it into the chat.
Also, add the `show_images_inline` setting (which is the cause of this
whole change).
Updated tests to handle this new change and start using async/await
instead of promise callbacks.
2018-10-15 22:19:04 +02:00
JC Brand
e425f25753
Listen for xmpp:
URIs in all of Converse, not only chatrooms
...
updates #537
2018-10-13 20:55:05 +02:00
JC Brand
99c0687684
Fixes #537 Open xmpp: URIs inside Converse
2018-10-13 20:16:00 +02:00
JC Brand
d77802da86
Avoid showing notification messages twice
...
For example `This groupchat is not anonymous`
2018-10-13 14:41:16 +02:00
JC Brand
7270abb08b
Some refactoring of the code that collapses leave/join messages
...
Mostly to match any previous leave/join message from the same user
Fixes #1062
2018-10-13 13:23:55 +02:00
JC Brand
7b9c97dfd3
Also squash leave/join messages
...
And fix an HTML rendering bug for info messages and nicks that contain spaces
2018-10-11 19:04:06 +02:00
JC Brand
71cc98d6f6
Reduce join/leave clutter by removing subsequent ones
...
Previously we checked only if the last message was a join message from
the same person.
Now instead we check the last n messages that are join or leave
notifications.
2018-10-11 15:59:52 +02:00
JC Brand
cf75d37587
join/leave notification fixes.
...
* Don't show leave notification twice when someone leaves, joins and then leaves again
* Add a test case for a member joining and then leaving
2018-10-11 14:05:52 +02:00
JC Brand
aa50942400
Don't show join message for non-online occupants created from members list
...
Fixes #1169
2018-10-11 13:23:39 +02:00
JC Brand
8c772a7f71
We do actually want to show join/leave messages for members
2018-10-11 13:21:01 +02:00
JC Brand
dffcc13dea
Fixes #1140 Add support for destroyed chatrooms
2018-10-10 22:57:12 +02:00
JC Brand
7a612460da
Fixes #1063 Make URLs in topic clickable
2018-10-07 03:31:18 +02:00
JC Brand
5836e9d805
Formatting
2018-10-05 04:43:24 +02:00
JC Brand
c1106f3867
Bugfix. Handler not triggered when submitting password form 2nd time
2018-10-05 03:29:14 +02:00
JC Brand
31080bf2f9
Add a FormData polyfill for Edge comptaibility
...
Fixes #1220
2018-09-24 16:18:51 +02:00