Commit Graph

353 Commits

Author SHA1 Message Date
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
Christoph Scholz
10da92ec5b fix LMC with Conversations 2019-03-22 17:37:28 +02:00
JC Brand
27557d6a04 Document _converse.ChatBox.prototype.sendMessage as an API method
Until now, we've only been explicitly documenting the `_converse.api`
namespace and only considered the methods under it as forming the API
contract (which determines how we do semver releases).

It appears as if we've reached a point where trying to keep everything
under the `_converse.api` namespace no longer makes sense. Certain
methods are applicable to particular models and trying to shoehorn them
into the `_converse.api` namespace seems clunky and non-intuitive.

I've therefore decided to slightly refactor `sendMessage` to let it take
two simple parameters and to document it with JSDoc so that it's
presented as an API method, albeit only available on a chat model.

updates #1496
updates #1504
2019-03-21 21:03:02 +01:00
JC Brand
d87551328d Upgrade to Strophe 1.3.2 2019-03-21 07:28:37 +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
4c50ac23e7 Add Jed as dependency of @converse/headless
fixes #1352
2019-03-15 15:49:12 +01:00
JC Brand
5b4ce87a4d Don't send out receipts or markers for MAM messages
Eventually we need to add better support for receipts and markers of MAM
messages.

We'll need to do the following:

* First check whether the MAM page already contains the receipts or markers, to avoid duplication
* Only ever in catchup mode
* Only after full catchup to ensure that the receipt is not in a different page than the message
2019-03-12 13:02:10 +01:00
Meitar M
76bff83ca3 Allow http: image URLs if Converse.js is loaded on an insecure origin.
Currently, in order for Converse.js to recognize a pasted URL as an
image, it must be an URL whose protocol is `https:` (`https` in the
URI.js library's notation). This is sensible, but means that any
non-HTTPS image URL is not recognized as a valid URL (and thus will not
be rendered inline, even if `show_images_inline` is set to `true`).

It is important to always check for HTTPS URLs when in a secure context
(i.e., the initial page load was requested via HTTPS) in order to ensure
that non-secured content does not mix with secured content. However, the
inverse is not true: if the original page was loaded over HTTP, then
enforcing HTTPS for images adds arguably no meaningful protection while
also breaking the `show_images_inline` feature for the edge cases where
Converse.js is deployed without HTTPS and a user pastes an HTTP URL.

This patch changes the behavior of the `isImageURL` method such that the
requirement for the pasted URL's protocol to be `https:` is enforced
only when the `window.location.protocol` itself is also `https:`. By
doing this, we ensure that secure origins (i.e., when Converse.js is
loaded over HTTPS initially) are still secured and cannot have non-HTTPS
content introduced to the page via a pasted non-HTTPS URL, however it
also allows non-HTTPS origins to render both HTTP and HTTPS image URLs.
2019-03-09 14:15:22 +02:00