Commit Graph

231 Commits

Author SHA1 Message Date
JC Brand
b70fde159d Fixes #1738. Allow webpack's publicPath to be specified at runtime 2019-10-06 21:52:37 +02:00
JC Brand
37d052ad9e Verify that Converse is not susceptible to CVE-2015-8688
https://gultsch.de/gajim_roster_push_and_message_interception.html
2019-09-12 19:46:09 +02:00
JC Brand
c24e72272b Fix testing bug where all subsequent tests after a timed out test also time out 2019-09-12 18:50:30 +02:00
JC Brand
cc91f3751e Add listenTo instead of on to avoid memory leaks 2019-09-06 16:04:06 +02:00
JC Brand
b5c56c8323 Add getFullname to XMPPStatus model and use that
instead of returning the fullname as fallback in `getNickname`
2019-09-05 12:49:10 +02:00
JC Brand
5f5de90f0c MUC: Don't set a default nick
We first want to check whether the user has registered a nick with the
MUC, and if so, that will be set as the nick.
2019-09-05 10:49:06 +02:00
JC Brand
c8f0fd2a7f Refactor cleaner separation between converse-vcard and other plugins 2019-09-05 10:49:06 +02:00
JC Brand
2c48096664 Add new spec with emoji tests 2019-08-22 13:56:47 +02:00
JC Brand
8b93e0f70a Move MUC message tests to spec/muc_messages.js 2019-08-14 10:34:56 +02:00
JC Brand
89ac4a6969 Show error message with option to retry when MAM query times out 2019-08-13 11:08:03 +02:00
JC Brand
aee6a192d1 Add a new command /modtools
in which you can set user affiliations and roles.

Also, let getAffiliationList return an Error instead of `null` if you're
not allowed to fetch a particular affiliation list.
2019-08-09 23:30:14 +02:00
JC Brand
a116a1ec8f Fix various website CSS issues. Re-add images 2019-08-09 00:17:03 +02:00
JC Brand
bea073a5a2 Fix erroneous "is no longer an admin/owner" messages in MUCs
Don't remove affiliation for occupants if we weren't allowed to
fetch that particular affiliation list.

Previously, if fetching the list failed, we would return an empty array,
which would imply that the affiliation list is empty and that all
users with the given affiliation should have their affiliations removed.

Instead we now return `null` and properly account for that when setting
affiliations on existing contacts based on the returned member lists.
2019-08-08 16:19:04 +02:00
JC Brand
a5cc9ef9ca Remove unused tests utility method 2019-08-01 11:51:16 +02:00
JC Brand
c4ad02d4e3 New config setting: muc_fetch_members 2019-07-26 13:32:21 +02:00
JC Brand
38d1e4e3d2 Bugfix. Sometimes when trimming chats, minimized chats go off screen 2019-07-12 12:50:20 +02:00
JC Brand
3a2bf766a0 Add new test utility waitUntilBookmarksReturned 2019-07-12 10:38:07 +02:00
JC Brand
a1630b5c1f Replace wait-until-promise with utility method
and bump default timeout

Also let `_converse.api.waitUntil` use it if a function is passed in.
2019-07-11 23:34:27 +02:00
JC Brand
ded9945ed9 MUC: Don't send XEP-0085 CSNs when we don't have voice
Includes some refactoring:

- Don't send an `active` chat state notification when entering a MUC
  I can't think of a good reason why this might be necessary or desired.
- Move `setChatState` form the view to the model
- Remove unused method `handleChatStateNotification`
- Don't store `role` and `affiliation` for the current user on the
  ChatRoom object, but instead on the ChatRoomOccupant object representing
  the user.
2019-07-10 14:24:00 +02:00
JC Brand
e5188d8b10 Bugfix. Remove affiliation based on updated members lists 2019-07-04 08:28:12 +02:00
JC Brand
1a3526f537 Update openAndEnterChatRoom to take JID 2019-07-04 08:28:12 +02:00
JC Brand
67bcc00f10 Associate ChatRoomOccupant to ChatRoomMessage
and use promises to indicate when an occupant or contact has been set
2019-07-04 08:28:12 +02:00
JC Brand
c759112cf3 Fix failing test 2019-06-25 22:53:39 +02:00
JC Brand
40469a9787 MUC: Refresh room features when re-entering a cached room
Only fetch messages after we have the latest room features
Otherwise we run into race conditions where MAM messages are fetched
before we know whether (updated) the room supports MAM or not.
2019-06-20 14:04:46 +02:00
JC Brand
bbe2a62295 converse-muc: Create info and error messages on the model
instead of on the view.
2019-06-12 06:27:07 +02:00
JC Brand
737e27c726 Use shakespearean character names in tests 2019-06-03 09:43:24 +02:00
JC Brand
7b11d85503 Add support for XEP-0198 Stream Management
- New plugin `converse-smacks`
- New config option `enable_smacks`
- Rename session cache id from `converse.bosh-session` to `converse.session`
- Refactor logout and login as consistently used api methods
- Refactor session cache to store per JID

Fixes #316
2019-06-03 09:43:12 +02:00
JC Brand
e1762a1bb5 Rename key event handler methods to avoid confusion 2019-05-26 11:09:43 +02:00
JC Brand
9cb9151265 Add test to check that #1577 is resolved 2019-05-21 12:05:47 +02:00
JC Brand
a95bb5b26a Refactor tests so that IQ_ids always contains only XML stanzas 2019-05-20 14:37:29 +02:00
JC Brand
cb9a1673c7 Clean up test runner config and remove unnecessary stuff 2019-05-13 18:44:32 +02:00
JC Brand
c2a0999627 Put CSS files also in ./dist 2019-05-10 12:57:30 +02:00
JC Brand
c3dac272f8 Replace moment with DayJS 2019-05-06 14:27:18 +02:00
JC Brand
89804ecfd5 Increase Jasmine's async timeout 2019-04-22 14:39:17 +02:00
JC Brand
f8fcdc7eb8 Explicitly log out after each test. 2019-04-22 14:04:21 +02:00
JC Brand
63a0c63927 Fix bugs with moving events 2019-03-29 21:56:56 +01:00
JC Brand
ab76a905f9 Remove more traces of awesomplete 2019-03-28 15:07:06 +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
Emmanuel Gil Peyrot
3aa9ee1ba0 Replace http: with https: in xmpp.org links 2019-03-04 17:49:44 +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
253958ed93 Prevent duplicate messages by comparing MAM archive id to XEP-0359 stanza ids 2019-02-19 23:08:29 +01:00
JC Brand
8d00294681 Use origin-id to check for reflected messages.
Also, store the returned `stanza-id` on the message.
2019-02-14 11:33:28 +01:00
JC Brand
dfe9d301c6 Test that roster groups are fetched before contacts
updates #1405
2019-02-13 11:20:49 +01:00
JC Brand
9f5031c278 Make converse.initialize an async function
- Combine all test init functions into `initConverse`
- Use `async` functions in more tests
- Replace `var` with `let` and `const` in more tests
- New utils method `toStanza` which converts a string to a Node
2019-02-12 15:34:50 +01:00
JC Brand
3c0e3d3fab Refactor out createMessage.
Changes:

* Avoids leaky abstraction of MUC code into converse-chatboxes
* Avoid creating unnecessary message objects (e.g. without <body)
* Add fix for #1369.
* Rename spec/chatroom.js to spec/muc.js
2019-01-28 13:27:25 +01:00
JC Brand
93bfa3bbbe The default used to be anon 2018-12-17 14:36:24 +01:00
JC Brand
935ca52b03 Test that open groupchats are shown with their bookmarked names 2018-12-15 19:31:19 +01:00
JC Brand
4cd06b645d Bugfix. [] evaluates to truthy 2018-12-13 11:09:58 +01:00
JC Brand
060fd94547 Allow features to be passed in to openAndEnterChatRoom 2018-12-13 09:31:36 +01:00