Commit Graph

360 Commits

Author SHA1 Message Date
JC Brand
f387c947f5 Allow the full app to be embedded.
- new config option `singleton`.
- new plugin `converse-uniview`
- removed `converse-embedded`.
- various CSS changes, to properly render an embedded full app
- don't re-open cached and non-autojoined chats in singleton mode

The goal here is to extend the `embedded` `view_mode` so that the full app can
also be embedded, not just a single MUC or private chat.

To do this, we'll need to differentiate between multi and singleton chat apps.

* A singleton chat app contains only a single chat.
* A multi-chat app can contain zero or more chats

So we introduce a new config option, `singleton`, which when used with
`view_mode` set to `embedded` will determine whether a single chat or the full
app is embedded.

Similarly, in `overlayed`, `fullscreen` and `mobile` view modes, `singleton`
set to true will allow only one chat within the parameters of that view mode.

We're appropriating the word `singleton` and introducing the concepts of
`uniview` and `multiview` (see a785ca8) to cover what was
previously meant with `singleton`.

updates #1297
2019-05-24 20:39:19 +02:00
JC Brand
7ab59ad63e Refactor MAM and clear private chats upon reconnection
- Add `onReconnected` method for chatboxes to clear messages
- Move MAM models to headless build.
- New event `onChatReconnected`
2019-05-22 14:10:19 +02:00
JC Brand
271c79eae8 Refactor message corrections
- Save date for older message versions and display it in the modal
- Properly handle the correction being received *before* the corrected message
2019-05-22 13:26:46 +02:00
JC Brand
7950f7c2ac Change muc_show_disconnection_status to muc_show_join_leave_status 2019-05-18 06:34:29 +02:00
supun19
d1572f3506 iOS viewport was less than 100vh so had to redefine vh units
fixes #1571
2019-05-15 18:32:11 +02:00
JC Brand
12989ab241 New event: chatBoxBlurred 2019-05-14 16:26:25 +02:00
supun19
dd0821076d Groupchat auto-configuration now supports list-multi fields 2019-05-14 15:28:06 +02:00
JC Brand
d0ddda8244 New config option muc_show_disconnection_status 2019-05-14 13:29:43 +02:00
JC Brand
7a990ae0b9 Fixes #1558, this.get is not a function 2019-05-13 14:37:48 +02:00
JC Brand
6247f65063 Add changelog entry for #1465 2019-05-10 12:57:30 +02:00
JC Brand
2526d80464 Change api.disco.supports to resolve to a Boolean
Also add a new API method `api.disco.features.get` for the use-case
where you still want the feature object to be returned.
2019-05-07 10:27:25 +02:00
JC Brand
c3dac272f8 Replace moment with DayJS 2019-05-06 14:27:18 +02:00
JC Brand
15b2273631 _converse.api.archive.query now returns a Promise
instead of accepting a callback functions.
2019-05-03 19:47:49 +02:00
JC Brand
8bb852b139 Updates #1554
Room auto-configuration broke if the config form contained fields with type `fixed`
2019-05-03 18:04:03 +02:00
JC Brand
52ea8d5ab6 Fixes #1550
Legitimate carbons messages blocked due to erroneous forgery check
2019-05-03 14:11:29 +02:00
supun19
eec51f9d62 Doc rooms api (#1551)
* Rooms Api
number of parameters in the documentation was made 2 from 3 as api which is used to open a room with default configuration has only 2 parameters.
2019-05-03 11:38:05 +02:00
JC Brand
d868b9a9f7 Continuously retry to fetch login credentials 2019-05-02 14:53:42 +02:00
JC Brand
b9e5658112 Message deduplication bugfixes and improvements.
- Add a new method to check for dupes based on the message text.
- When checking for dupes based on origin_id, no need to restrict to
  only our own.
2019-04-27 18:09:58 +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
e189acc8c9 Returning nick with credentials_url complicates things too much 2019-04-23 14:53:48 +02:00
JC Brand
624cf4f435 Allow nickname to be provided by the credentials_url 2019-04-23 12:06:40 +02:00
JC Brand
25a0a898f2 Don't restore a BOSH session without knowing the JID 2019-04-22 14:33:49 +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
d2166ce3dd Remove deprecated API methods
since the next release will be a major one.
2019-04-16 16:57:55 +02:00
JC Brand
ee78ec1333 Add force parameter to _converse.chats.open
This changes the API method's current behavior by not automatically
maximizing (in `overlayed` view mode) or bringing a background chat into
foreground (in `fullscreen` view mode). Instead `force` needs to be set
to `true` for that to happen.
2019-04-16 16:42:15 +02:00
JC Brand
f48adb386e Fixes #1296 2019-04-16 12:59:36 +02:00
JC Brand
1328168d1e Fixes #1532 Converse reloads on enter pressed in the filter box 2019-04-11 23:44:16 +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
a75c118a2c Prioritize roster nickname as message and chatbox display name
Set reference to roster contact on the message and chatbox object and
listen for changes to the nickname.

Currently, because chat boxes are fetched and initialized before the
roster, messages and chats are repainted with the correct display name
only later, causing a "flash" effect.

Ideally we would only initialize the chat boxes after the roster
contacts have been fetched, but this is currently not easily possible
because we need the control box to render before everything else.
2019-04-09 17:20:41 +02:00
JC Brand
87337eaeef Bugfix. Modal auto-closes when you open it a second time 2019-04-08 21:45:09 +02:00
Marc Laporte
1a22a94491 Clarify section title
I hope this is what you meant :-)
2019-04-08 17:48:52 +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
50d9b2ec80 Mention MAM:1 incompatibility 2019-04-04 14:07:44 +02:00
JC Brand
86b7633e59 Mention all translations 2019-04-04 13:19:34 +02:00
JC Brand
acab0339f1 New release 4.2.0 2019-04-04 12:33:08 +02:00
JC Brand
1dfdb36d20 Don't filter out own device when sending OMEMO message 2019-03-30 13:55:25 +01:00
JC Brand
be1abdb5ff Add classes for easy styling 2019-03-28 15:43:29 +01:00
Christoph Scholz
dde815e0a8 Allow manual entry of jid with xhr_user_search_url 2019-03-28 15:38:56 +01:00
JC Brand
d300be58cc Fixes #144. Fall back to JID if name is not available 2019-03-28 15:37:01 +01:00
JC Brand
34b8cd2ee6 Prevent user from adding themselves as contact 2019-03-28 15:36:08 +01:00
JC Brand
cc865de0f0 Add new config setting autocomplete_add_contact
Determines whether search suggestions are shown in the "Add Contact" modal.
2019-03-28 14:34:12 +01:00
JC Brand
b726a2353c Remove Awesomeplete in favor of _converse.AutoComplete 2019-03-28 12:43:34 +01:00
JC Brand
03f9eb95da Fixes #1467. Fix rendering of URLs enclosed with sharp brackets
such as <https://example.org>
2019-03-27 11:24:55 +01:00
JC Brand
225312694f Two small updates
* Ensure that outgoing messages are also marked as single emojis
* Also set msgid to origin-id for sent groupchat messages
2019-03-26 22:03:56 +01:00
JC Brand
3ce3d661bc Make sure required registration fields have "required" attribute 2019-03-26 14:52:26 +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
Guus der Kinderen
bde1b9529b Minimized bookmarked chatboxes should not be always maximized after page reload
This is a fix for https://github.com/conversejs/converse.js/issues/1508
2019-03-26 11:06:32 +01:00