Commit Graph

631 Commits

Author SHA1 Message Date
JC Brand
75d64c04d9 Add a hooks API
for triggering interceptable events with the goal of modifying data.
2020-04-06 17:22:06 +02:00
JC Brand
531ebf335c Properly test and fix show/hide of MUC topic 2020-04-06 15:27:32 +02:00
JC Brand
bb9e394e93 muc: handle join/leave notifications similarly to CSNs
Remove the `muc_show_join_leave_status` config setting.
We don't show the optional statuses at all now.
2020-04-01 14:34:11 +02:00
JC Brand
c20dbbbbbd Store in user settings whether a MUC topic is hidden or not 2020-03-31 22:57:22 +02:00
JC Brand
e498657323 Add API for setting and accessing user settings 2020-03-31 15:01:02 +02:00
JC Brand
6391cc0803 Rename applyUserSettings to applySiteSettings 2020-03-31 14:08:34 +02:00
JC Brand
030c26a8ab Use api shortcut instead of _converse.api 2020-03-31 13:16:24 +02:00
JC Brand
d057177f1b core: Further cleanup and refactoring 2020-03-31 12:51:30 +02:00
JC Brand
8b1d4e0e9d core: refactor initialize method to make it as small as possible 2020-03-31 12:28:11 +02:00
JC Brand
631b9bb438 Use the settings API for setting and getting config settings
This is an initial step towards no longer storing and accessing settings
directly via the `_converse` object
2020-03-31 11:57:03 +02:00
JC Brand
095a1bc56b Fixes #1490. Don't reconnect if were weren't auth'd to begin with. 2020-03-30 05:29:21 +02:00
JC Brand
690ff1fba1 Fixes #1860 2020-03-30 04:13:46 +02:00
JC Brand
321a54323e Allow moderators to retract their own messages...
when retractions are restricted to mods only
2020-03-26 10:35:08 +01:00
JC Brand
967154d314 Use optional chaining instead of lodash.get 2020-03-24 12:30:45 +01:00
JC Brand
5e27579ebe Don't ignore groupchat messages that also contain a CSN 2020-03-23 20:54:27 +01:00
JC Brand
57709b2e78 Sort modtools search results by nickname 2020-03-23 18:06:36 +01:00
JC Brand
b5d57f0ef8 Handle and render chat state notifications separately from messages 2020-03-21 17:21:53 +01:00
JC Brand
ca012d4479 Update to newer Skeletor.js
`.forEach` on a Collection no longer returns the models, so need to
update some tests.
2020-03-12 15:24:29 +01:00
JC Brand
6fe802a96b Replace lodash methods with native ones 2020-03-06 15:49:48 +01:00
JC Brand
366dee0aa5 Bugfix. Allow moderators to retract their own messages 2020-03-05 13:42:58 +01:00
JC Brand
a7f28cd61d When creating message objects, wait for confirmation from storage
Queue messages and handle them sequentially, each time waiting for promises to
resolve before handling the next message.

Updates #1899, which likely happens because an error message is received
before messages have been fetched.
2020-03-04 15:14:57 +01:00
JC Brand
8aaa1a6417 core: Make clearSession a synchronous event
In order to give plugins time to properly clear data from the browser storage.
2020-03-03 10:23:46 +01:00
Dele Olajide
5a9f8218c8
Fix issue 1896 (#1897)
* fix issue https://github.com/conversejs/converse.js/issues/1896

* Added issue to CHANGES.md
2020-02-28 11:24:25 +01:00
JC Brand
f02caff854 Rejoin the MUC if we receive an empty message 2020-02-27 16:40:29 +01:00
JC Brand
34c4b2aa5e Prevent empty messages from being created 2020-02-27 15:09:54 +01:00
JC Brand
e5341d54a9 Bugfix. Dangling moderation messages not applied 2020-02-22 22:59:30 +01:00
JC Brand
5fe23f477f modtools: Fetch affiliation list when we haven't fetched it by default 2020-02-21 16:20:30 +01:00
JC Brand
3c9ec96350 MUC: create references for nicks gathered from messages 2020-02-21 12:30:40 +01:00
JC Brand
62ef18a027 muc_fetch_members now accepts an array of affiliations 2020-02-20 18:39:56 +01:00
JC Brand
590a8862bc Don't validate message creation
This causes messages to be created but then not populated, causing empty
messages appearing in the chat after page relaod.

Fixes #1886
2020-02-20 13:08:12 +01:00
JC Brand
49817a850f MUC: Queue messages received before we're ready 2020-02-20 07:13:04 +01:00
JC Brand
58f6d36564 MUC: wait for messages collection to be initialized
before processing MUC messages received prematurely due to SMACKS
resumption.
2020-02-19 14:22:24 +01:00
JC Brand
0137eb88ae Smacks: Handle MUC messages received before the MUC exists 2020-02-19 13:39:07 +01:00
JC Brand
5b5c4595cc Rename hide_subject to subject_hidden 2020-02-18 17:26:49 +01:00
JC Brand
ce08819a43 Retracted moderated sent message should not be editable. 2020-02-18 16:47:52 +01:00
JC Brand
ead8cdbcd6 Retracted moderated message should not be editable.
Also, don't set retracted MUC messages as ephemeral, we want to keep on
showing them to provide context in a MUC.
2020-02-18 16:06:59 +01:00
JC Brand
227b70339c Bugfix. Retracted messages shouldn't be editable. 2020-02-18 15:45:55 +01:00
JC Brand
004d2b7f23 Fix method name in log 2020-02-18 15:45:55 +01:00
JC Brand
bcbde04530 Copy sounds dir to dist and use assets_path for sounds_path 2020-02-16 12:30:25 +01:00
JC Brand
f564a1edaf Show reason and actor for ban/kick events 2020-02-14 13:19:12 +01:00
JC Brand
39d140005e Change when/how chats are shown
Goal is to fix a timing bug that results in `show` being triggered
before the `ChatBoxView` has been initialized, which means that 1:1
chats aren't opened when you reload the page.
2020-02-14 11:06:04 +01:00
JC Brand
3400acbfeb Show MUC buttons in a dropdown menu
- Get rid of the ChatBoxHeading class
- Add support for showing standalone buttons in overlay viewmode
2020-02-13 20:57:47 +01:00
JC Brand
ed411c226d Avoid creating Message objects for empty messages 2020-02-13 16:31:13 +01:00
JC Brand
181d18fcfe Translation and undefined variable fixes 2020-02-11 10:13:23 +01:00
JC Brand
faa02b058d Make sure messages Collection exists when we receive an error message 2020-02-10 18:41:32 +01:00
JC Brand
7d91b17552 Rename methods to clarify their purpose 2020-02-07 12:42:19 +01:00
JC Brand
fb9fe280ac Updates to how dupes are detected.
- Collapse 3 different loops into one.
- Check all saved stanza ids in the parsed attrs, not just the archive id
- Remove check for archive id in converse-mam since it just duplicates what's now being done in converse-chat
- Don't use disco to check for support, XEP-359 mandates that services SHOULD advertise support,
  which is not a strong enough guarantee that they do.

updates #1856
2020-02-07 12:35:45 +01:00
JC Brand
746fe441e2 Updates the message parsing.
Only set `id` once we've actually parsed the sender attributes,
otherwise `attrs.from` is `undefined`.

Use `Array.prototype.reduce` to generate stanza_ids attributes map.

Add `from_muc` attribute which contains the MUC JID
2020-02-07 12:12:38 +01:00
JC Brand
d2b6b41128 emoji-picker: Make sure that emojis as images are rendered properly 2020-02-06 16:27:44 +01:00
JC Brand
a1670462ca Remove jquery and undersscore shims 2020-02-06 14:51:50 +01:00