Commit Graph

174 Commits

Author SHA1 Message Date
JC Brand
aa90ebd7f0 Bugfix. Don't delete JID or resource...
when an affiliation change presence is received.
2019-04-11 01:39:06 +02:00
JC Brand
234556793f Provide a more user-friendly error message to muted users 2019-04-10 22:03:00 +02:00
JC Brand
f1899d0977 Looser coupling with converse-vcard
To make it easier to remove it without breaking stuff.
2019-04-10 19:35:35 +02:00
JC Brand
d3a80e804f Move converse-caps into the headless build 2019-04-10 19:22:11 +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
d450ab5868 For a message, get VCard based on bare jid of sender 2019-04-09 13:54:55 +02:00
JC Brand
5532a9ec63 Remove jquery from tests 2019-04-08 21:45:09 +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
acab0339f1 New release 4.2.0 2019-04-04 12:33:08 +02:00
JC Brand
77241bf5fe Single emoji rendering fixes.
* Make the emoji a little bit smaller
* Avoid scrollbar appearing for single emoji messages
* Also identify single sent emojis
2019-03-31 20:46:49 +02:00
JC Brand
21ca33ec29 Bugfix. Create device based on prekey message for from JID
Otherwise for sent carbons we created it for the wrong user.
2019-03-31 19:36:04 +02:00
JC Brand
97400ed568 Also identify sent carbons as such. 2019-03-31 19:16:40 +02:00
JC Brand
f0201e236d Set default value of 'status' to undefined.
When no status message is in a presence stanza, the value gets set to
undefined, so we might as well make this the default value to avoid
unnecessarily triggering change events.
2019-03-31 13:05:13 +02:00
JC Brand
a45bd8d14b Convert older docstrings to JSDoc syntax 2019-03-30 12:54:56 +01:00
JC Brand
63a0c63927 Fix bugs with moving events 2019-03-29 21:56: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
d300be58cc Fixes #144. Fall back to JID if name is not available 2019-03-28 15:37:01 +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
42128e051d Regenerate headless build 2019-03-28 12:43:34 +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
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
a9ce9acff2 Make sure nickname config option takes precedence
above other nickname sources.
2019-03-26 11:31:11 +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
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
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
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
0ebfc3fce8 Let converse-autocomplete also be triggered with backspace 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
b15ebdde40 Update to Backbone 1.4.0 and use fork of Backbone.NativeView
with `_setElement` fix.

See https://github.com/akre54/Backbone.NativeView/pull/29
2019-03-01 11:56:22 +01:00
JC Brand
c26dde34f9 Allow setting of debug mode via URL with /#converse?debug=true 2019-02-27 16:28:30 +01:00
JC Brand
49da581d14 Fixes #1400. When chat message is only an emoji, enlarge it 2019-02-27 10:34:47 +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
59c43a23f0 Two changes, see below
* Add new test helper to create contacts via IQ exchange
* Use roster nickname to set message fullname
2019-02-24 20:27:41 +01:00
JC Brand
5afb3051cc New release v4.1.2 2019-02-22 16:49:45 +01:00
JC Brand
a8e05dae36 Fall back to chatbox JID if the stanza has no from 2019-02-21 09:21:18 +01:00
JC Brand
f123f483ae Fixes #1406 2019-02-21 09:19:02 +01:00