Commit Graph

84 Commits

Author SHA1 Message Date
JC Brand
53520317fc Move locked_muc_domain and muc_domain to model 2019-05-21 13:05:58 +02:00
JC Brand
1269d53e02 Move enterRoom method to the model 2019-05-21 12:04:55 +02:00
JC Brand
0e49ebf695 Rename method to clarify that it's not simply an accessor 2019-05-21 11:33:01 +02:00
JC Brand
d1d81bf933 Bugfix. Remove condition before fetching members 2019-05-21 11:33:01 +02:00
JC Brand
bb0c0fcd81 Remove message views when messages get reset 2019-05-21 09:56:27 +02:00
JC Brand
b4b7fedf0f Bugfix. Add id to outgoing MUC messages 2019-05-20 17:16:16 +02:00
JC Brand
5f04176929 Clear messages when converse reconnects 2019-05-20 17:10:34 +02:00
JC Brand
7e515dd4b1 Move all MUC joining logic to the model 2019-05-20 10:06:37 +02:00
JC Brand
39363d495f Fetch messages in MUC model 2019-05-20 09:25:11 +02:00
JC Brand
46fef28601 Clear messages when closing a chat 2019-05-19 22:11:37 +02:00
JC Brand
0426898c23 Store chat messages in sessionStorage
so that they're cleared when the last tab closes
2019-05-18 06:57:48 +02:00
JC Brand
9a94e5b47e Bugfixes in fetching of occupants 2019-05-15 14:30:43 +02:00
JC Brand
1bc425e596 Fetch cached occupants in the model instead of the view 2019-05-15 09:34:52 +02:00
supun19
dd0821076d Groupchat auto-configuration now supports list-multi fields 2019-05-14 15:28:06 +02:00
JC Brand
6193a9dc80 Replace lodash methods with native ones and remove lodash.fp 2019-05-14 12:41:47 +02:00
JC Brand
ca5b6f9fde Add class on MUC message to indicate author's role 2019-05-13 20:10:48 +02:00
JC Brand
145ee88213 Start handling error presences in MUC model 2019-05-09 12:18:36 +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
9528276be2 Use native Date methods instead of moment
- Use native `getTime` method instead of moment's `valueOf`
- Use toISOString() instead of moment().format()
  This makes the code timezone independent since we're now globally using UTC.
2019-05-06 10:28:03 +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
346baa686f Refactor room auto-configuration 2019-05-03 18:01:07 +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
34469425d6 Use Object.assign instead of _.extend 2019-04-29 09:07:15 +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
66adf03557 Bugfix. Order of operations. 2019-04-24 10:05:18 +02:00
JC Brand
741be5cc04 converse-muc: Handle VCards not being available 2019-04-23 12:32:59 +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
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
f84c201437 Hide the textarea when a user is muted in a groupchat 2019-04-11 01:40:16 +02:00
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
e987214555 For roomspanel, don't set muc_domain if its locked 2019-04-05 13:14:57 +02:00
JC Brand
a45bd8d14b Convert older docstrings to JSDoc syntax 2019-03-30 12:54: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
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
11c1b01692 Add converse-headless.js dist file and recipes
updates #1352
2019-03-15 10:24:39 +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
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
d3a4555165 Re-add support for muc_domain and add locked_muc_domain.
updates #1373
2019-02-26 11:58:01 +01:00
JC Brand
253958ed93 Prevent duplicate messages by comparing MAM archive id to XEP-0359 stanza ids 2019-02-19 23:08:29 +01:00
JC Brand
c026dc8a86 New copyright year 2019-02-18 20:23:18 +01:00
JC Brand
9233087548 Don't hash web storage ids.
Makes debugging more difficult and uses up extra CPU cycles for no real security benefit.
2019-02-18 20:23:18 +01:00