Commit Graph

5751 Commits

Author SHA1 Message Date
JC Brand
298300e890 Add test for muc_respect_autojoin 2019-03-27 08:34:52 +01:00
JC Brand
b81fa43a74 Tweak API css 2019-03-26 22:37:26 +01:00
JC Brand
c81f064137 Fix syntax errors in lt po file 2019-03-26 22:07:39 +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
275ad40f13 CSS fix: Unread number not visible on unread message count 2019-03-26 11:31:47 +01:00
JC Brand
a9ce9acff2 Make sure nickname config option takes precedence
above other nickname sources.
2019-03-26 11:31:11 +01:00
JC Brand
d7db4df468 Remove jquery from spec/chatbox.js 2019-03-26 11:06:33 +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
JC Brand
ba81207da5 Upgrade to Jasmine 2.99.2 2019-03-25 23:05:21 +01:00
JC Brand
e0cb3c34bb Bugfix. Don't extend chatbox attributes
when creating attributes for outgoing message.

Otherwise `id` is the same for all messages.
2019-03-25 23:04:39 +01:00
Christoph Scholz
10da92ec5b fix LMC with Conversations 2019-03-22 17:37:28 +02:00
JC Brand
dbccc08cf6 Trying to avoid intermittent failure on Travis 2019-03-22 15:53:03 +01:00
JC Brand
fa85fc71b9 Use async/await 2019-03-22 15:49:44 +01:00
JC Brand
76b32bea92 Add logo and custom CSS for the API docs 2019-03-22 15:22:21 +01:00
JC Brand
56bee63ed1 Start documenting events with JSDoc 2019-03-22 15:21:51 +01: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
675692df74 Use _converse.api.send to forward messages 2019-03-21 20:54:23 +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
ce539ac685 Add more files to ignore 2019-03-15 15:54:26 +01:00
JC Brand
a0f5dfd35f Make sure API docs are also generated from headless code 2019-03-15 15:49:12 +01:00
JC Brand
4c50ac23e7 Add Jed as dependency of @converse/headless
fixes #1352
2019-03-15 15:49:12 +01:00
JC Brand
c0f3096216 Move MAM view overrides and view-based code out of @converse/headless
updates #1352
2019-03-15 15:49:12 +01:00
JC Brand
11c1b01692 Add converse-headless.js dist file and recipes
updates #1352
2019-03-15 10:24:39 +01:00
JC Brand
d919e81216 Set up XML logging before emitting connectionInitialized 2019-03-15 10:24:15 +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
Christoph Scholz
ed9d2a2526 make it configurable whether to respect autojoin 2019-03-09 14:10:40 +02:00
JC Brand
be156dee1e Explicitly set outline-color for chatbox and chatorom textarea 2019-03-07 18:18:42 +01:00
JC Brand
1bc834e808 Document how to disable the spoiler button 2019-03-07 17:52:51 +01:00
JC Brand
143d44c3f6 Avoid horizontal scrolling on the fullscreen login page 2019-03-07 17:47:30 +01:00
JC Brand
ebd1797991 Call save only once when updating a cached message 2019-03-07 17:38:07 +01:00
Axel Viala
b51d98d6d1 Fix #1327: Refusing url and email as mentions
Before the function `extractReference` in
`/src/headless/converse-muc.js` matched url and email.

Fix: https://github.com/conversejs/converse.js/issues/1327
2019-03-07 16:53:27 +01:00
JC Brand
33600eeece No need for a separate archive_id value.
With MAM2 we can just use stanza-id
2019-03-07 16:45:00 +01:00
JC Brand
be6a5d9c37 Reuse XEP-359 unique and stable stanza ids for Message id.
This helps us to avoid duplicates by relying on the fact that Backbone
models have unique ids.
2019-03-07 08:56:17 +01:00
JC Brand
49da3424e5
Merge pull request #1475 from wrooot/master
Update Lithuanian (lt) translation
2019-03-06 15:21:28 +01:00
JC Brand
2de794abc1
Merge branch 'master' into master 2019-03-06 15:10:26 +01:00
Holger Weiss
a15aec3519 Assume "text-single" as default form field type
As per XEP-0004, the default "type" of data form fields is
"text-single", so a missing "type" attribute should not be treated
differently.

This fixes handling of CAPTCHAs offered by ejabberd.
2019-03-06 15:08:41 +01:00
Christoph Scholz
37800d92d3 allow drag & drop also in MUCs 2019-03-05 18:21:07 +01:00
JC Brand
49d04bef83 Remove check that passes locally but fails on Travis 2019-03-05 18:11:14 +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
wrooot
86730b86bf #1474 Updated lithuanian (lt) translation 2019-03-03 14:36:13 +02:00
wrooot
123fb6a42f #1474 Updated lithuanian (lt) translation 2019-03-03 14:33:59 +02:00