Commit Graph

148 Commits

Author SHA1 Message Date
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
JC Brand
ad9a840cb7 Avoid saving full MUC JID as domain 2018-09-14 10:31:58 +02:00
JC Brand
0a3a6222c6 Provide error feedback to the /register command.
Also fix if/boolean bug when checking whether we should automatically
register
2018-09-13 12:39:50 +02:00
JC Brand
cd05b89726 Fix failing tests due to MUC disco refactoring 2018-09-13 10:52:25 +02:00
JC Brand
8806efce50 Include nick when registering someone as a member
This will cause their nick to be registered (if Prosody supports it).
2018-09-12 15:32:38 +02:00
JC Brand
f5b10ff6e8 Formatting 2018-09-12 15:32:37 +02:00
JC Brand
71370f5b45 Add the /register command for registering yourself 2018-09-12 15:32:37 +02:00
JC Brand
6457bc765a MUC: Use converse-disco to query for room features
By doing so we create a new DiscoEntity for the room, which allows us to
query for features via the disco API.

We also avoid duplication of functionality between converse-muc and
converse-disco
2018-09-12 12:36:14 +02:00
JC Brand
acef8feaaa Refactoring of fetching of reserved nick
- Move `getDefaultNickName` to the model and rename to `getDefaultNick`
- Let `checkForReservedNick` return a promise and save `nick` once received
- Updated `openAndEnterChatRoom` to wait appropriately and remove presence-wrapper
- Update tests to wait appropriately
- Remove presence-wrapper in `getRoomFeatures`
2018-09-12 12:36:13 +02:00
JC Brand
2df9b24211 Add option to auto-register your nickname to a room
See https://xmpp.org/extensions/xep-0045.html#register
2018-09-12 12:36:13 +02:00
JC Brand
06352b67c1 Fix AttributeError 2018-09-07 14:49:11 +02:00
JC Brand
8cc88d9b17 Fixes #1152 CSN in MUC triggers rate limiting.
- Avoid registering `sendChatState` twice as handler.
- Avoid sending out a CSN right after sending out a message
2018-09-07 14:00:57 +02:00
JC Brand
999536365d Fixes #1014 Don't show IRC gateway as MUC prefill 2018-09-07 13:14:36 +02:00
JC Brand
014354d075 Fixes #986 Affiliation changes aren't displayed in the chat 2018-09-07 11:54:29 +02:00
JC Brand
27378068c0 Fixes #1064 /topic without argument sets topic to "undefined" 2018-09-07 10:21:47 +02:00
JC Brand
572cc49498 Show room subject in heading, not description 2018-09-07 09:55:36 +02:00
JC Brand
023249f62e Render profile avatar as canvas.
We now have uniform avatar rendering for the profile, messages and
chatboxes.

By rendering as canvas, we can avoid stretching the image.

In the process I also moved the ChatBoxViews collection into its own
plugin `converse-chatboxviews` and placed the AvatarAware views there.

fixes #1157
2018-09-06 15:33:13 +02:00