Commit Graph

2804 Commits

Author SHA1 Message Date
JC Brand
b71500104b Move emoji-picker out so that its width can expand 2019-10-29 17:19:33 +01:00
JC Brand
9934fa7191 New event minimizedChatViewInitialized 2019-10-22 18:33:56 +02:00
JC Brand
b6d5077d04 Refactor _converse.XMPPStatus out into headless/converse-status.js
Also move some other methods out of `converse-core` into the plugins
that use them.
2019-10-18 11:13:09 +02:00
JC Brand
aae7e111eb Fix roster caching and versioning issue.
- Always try to first get local cache before requesting the roster.
- Rename `roster_fetched` with `roster_cached`
2019-10-17 16:19:14 +02:00
JC Brand
015f1c6fc8 Make status clickable instead of adding pencil icon 2019-10-17 13:33:43 +02:00
JC Brand
ea54644a45 Fixes #1089. When filtering by online, show all non-offline users 2019-10-17 13:30:23 +02:00
JC Brand
f7a57f272e Remove show_only_online_users config setting.
Doesn't appear to be very useful. IIRC it was added as a workaround for
slow roster issues.
2019-10-17 13:17:37 +02:00
JC Brand
e6e23a1a82 Add initial support for custom emojis 2019-10-17 12:12:08 +02:00
JC Brand
2ed8b4660e Bugfix. Duplicate rooms-list header 2019-10-16 12:11:59 +02:00
JC Brand
99805d2510 Make sure the roster is fetched again if stream resumption fails 2019-10-15 14:30:04 +02:00
JC Brand
9d619820f9 core: Don't allow the connection to be passed in.
This was used for tests but is no longer necessary.
2019-10-15 14:30:04 +02:00
JC Brand
be03b30d75 bookmarks: better handling of timeouts
- Inform the user when fetching of bookmarks times out.
- Only set the cached flag if the user doesn't have bookmarks.
2019-10-15 13:09:34 +02:00
JC Brand
487f1b5281 core: use _.get since connection might not be set up yet 2019-10-15 13:09:34 +02:00
JC Brand
f21abc60f5 roster: Only fetch from browser storage if already cached 2019-10-15 13:09:34 +02:00
JC Brand
358187f8b0 bosh: Bugfix, pass in JID 2019-10-14 13:22:34 +02:00
JC Brand
0fa95ccd50 Bugfix. Pass correct arguments to synchronous event handlers 2019-10-13 19:58:00 +02:00
JC Brand
50b77e8608 Fixes #1733 2019-10-13 19:48:39 +02:00
JC Brand
c8b7e8ab99 bookmarks: refactor to use VDOMView instead of OrderedListView 2019-10-13 17:53:57 +02:00
JC Brand
91397125ba roomslist: Refactor to use VDOMView instead of OrderedListView 2019-10-13 16:59:31 +02:00
JC Brand
82bce1e946 Move creation of browserStorage into a separate method
This is in anticipation of the localforage/IndexDB merge
2019-10-11 20:40:31 +02:00
JC Brand
9d77a4ef97 Fixes #129 Add support for XEP-0156.
Only XML is supported for now.
2019-10-11 17:46:13 +02:00
JC Brand
54e9c51a1a Don't rely on getUniqueId of Strophe.Connection
since we can't assume it's always available.
2019-10-11 17:46:13 +02:00
JC Brand
6253dd52a6 core: let logout return a promise and wait for it in tests 2019-10-11 17:46:13 +02:00
JC Brand
a0bd6dbab6 dragresize: Use _.get for converse.connection 2019-10-11 17:46:13 +02:00
JC Brand
5383d65d5a roster: unregisterPresenceHandler must be wrapped in arrow function 2019-10-11 17:46:13 +02:00
JC Brand
b63b080419 chatboxes: wait until messages are fixed before returning new chatbox
Fixes #1691
2019-10-10 14:44:13 +02:00
JC Brand
8e4e918575 Replace lodash methods with built-in ones and add jsdoc strings 2019-10-10 14:43:13 +02:00
Christoph Scholz
2d44144b69 prevent message correction for files 2019-10-10 14:19:34 +02:00
JC Brand
8780f7a128 Fix linting errors (no-unused-vars) 2019-10-09 16:27:58 +02:00
JC Brand
8b1c17c12b chatview: Replace lodash methods with built-in ones 2019-10-08 21:29:43 +02:00
JC Brand
f9b09052eb core: Make sure window.converse is defined before assigning to it. 2019-10-08 16:47:30 +02:00
JC Brand
75c11a2006 emoji-views: Specify dependency on muc-views
Otherwise plugins might be loaded out of order and then event handlers
in this module don't get registered.

Also, bump to dev version number
2019-10-08 16:30:23 +02:00
JC Brand
266fe131a9 Release 5.0.4 2019-10-08 14:22:56 +02:00
JC Brand
b70fde159d Fixes #1738. Allow webpack's publicPath to be specified at runtime 2019-10-06 21:52:37 +02:00
JC Brand
5c532e3b92 Build po files and add Vietnemese as available language 2019-10-06 21:52:09 +02:00
JC Brand
fdb24122c0 chatboxes: clear messages when in untrusted mode 2019-10-04 17:47:57 +02:00
Christoph Scholz
1c7c25091f new config option: allow_message_corrections 2019-10-04 15:42:38 +02:00
JC Brand
43935a9e56 controlbox: replace lodash methods with native ones 2019-10-04 14:53:20 +02:00
JC Brand
463caf36a1 bookmarks: silently remove bookmarks when clearing the session 2019-09-26 16:43:26 +02:00
JC Brand
0895abf3e4 chatboxes: Replace lodash methods and only import what's necessary 2019-09-26 15:21:47 +02:00
JC Brand
44e5b4c947 bosh: only advertise support if the module is enabled
updates #1725
2019-09-24 15:42:13 +02:00
Christoph Scholz
bce8dc9113 Fixes #1714
don't notify if only message delivery receipt
2019-09-24 13:27:49 +02:00
Christoph Scholz
cd5dacbe29 Process stanzas from mam one-by-one 2019-09-21 13:26:36 +02:00
JC Brand
51b818f916 smacks: Also check for BOSH to determine support 2019-09-20 12:06:43 +02:00
huang.xinghui
9291dfc918 Update package.json
fix: fixed main file path
2019-09-17 11:33:57 +02:00
JC Brand
8574f66954 Don't hardcode roster filter to localStorage 2019-09-17 10:49:02 +02:00
JC Brand
e377c9bd6f Fixes #1712 2019-09-16 14:04:28 +02:00
laszlovl
ab9b2d64ab Fix incorrectly detecting every message with a duplicate ID as correction 2019-09-16 13:07:14 +02:00
JC Brand
9d52b16b58 Set new dev version 2019-09-13 16:05:18 +02:00
JC Brand
39896b508b Release 5.0.3 2019-09-13 15:19:00 +02:00
JC Brand
bdf4f3f536 Bump npm and lodash 2019-09-13 13:38:20 +02:00
JC Brand
68e34351ed Reject unencapsulated forwarded messages
since we don't support XEP-0297 on its own
2019-09-13 13:05:21 +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
c6f3da5887 Clean up test 2019-09-12 19:15:13 +02:00
JC Brand
d58380af83 Provide more info in error message 2019-09-12 12:51:20 +02:00
JC Brand
5afe8629cd Remove mistakenly pasted jsdoc snippet 2019-09-12 12:48:09 +02:00
JC Brand
a6b7d0d972 Emit chatBoxFocused and chatBoxBlurred events for emoji picker input 2019-09-12 11:05:27 +02:00
JC Brand
5bf0955193 Release 5.0.2 2019-09-11 17:44:38 +02:00
JC Brand
35e97c2353 Ignore MAM chat messages not sent from yourself 2019-09-11 14:18:21 +02:00
JC Brand
0af9bc8ffc Fixes #1704
Ignore carbon groupchat messages
2019-09-11 14:18:21 +02:00
Licaon_Kter
a69ebcbdf6 Capitalize "groupchat" (#1707)
* Capitalize "groupchat"

* Also locale

* Also muc spec
2019-09-11 14:17:23 +02:00
JC Brand
26c1dbb0eb Updates #1705. Add getRoomsPanel method to avoid dangling pointer 2019-09-11 11:28:28 +02:00
GRUNBLATT Remy
d0b6e8fd16 Update Oauth login to current API format 2019-09-11 11:09:12 +02:00
JC Brand
e305cc35b0 Remove --larger class on a edited message that's no longer just emojis 2019-09-10 16:54:32 +02:00
JC Brand
54c90e146e Replace lodash methods with built-ins 2019-09-10 15:47:30 +02:00
JC Brand
1a7b7f1bea modtools: fix typo 2019-09-09 12:10:44 +02:00
JC Brand
3fee5540a0 modtools: Also allow querying and setting no affliation 2019-09-09 11:25:46 +02:00
JC Brand
2ec70adc5d modtools: Add help text to explain roles and affiliations 2019-09-09 11:02:14 +02:00
JC Brand
90ef4b0c9d Don't let non-mods open the modtools modal
Bugfix: fall back to nick if the JID is not available.
2019-09-08 00:15:05 +02:00
JC Brand
768ed4a577 Replace lodash methods with built-ins, convert docstrings to JSDoc 2019-09-07 23:14:33 +02:00
JC Brand
46ccc1a87f Fixes #1692 2019-09-06 16:14: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
d9c1bbf95b updates #1691: Use listenTo
so that we have automatic event deregistration when the model gets removed.
2019-09-06 13:10:37 +02:00
JC Brand
dfafbefb71 emoji-view: insert partially matched emoji on enter
if it's the only search hit.
2019-09-05 16:22:57 +02:00
JC Brand
f52ade1193 emoji-views: don't iterate over all emojis if...
new search term includes the previous one
2019-09-05 16:17:59 +02:00
JC Brand
bf599f39ff emoji-views: reinitialize intersection observer upon rerender 2019-09-05 15:29:30 +02:00
JC Brand
01468fc087 converse-emoji: Sort search results
Also, don't show the categories while searching.
2019-09-05 14:49:06 +02:00
JC Brand
60f04bc915 converse-emoji: Avoid dangling pointers to removed category DOM elements 2019-09-05 14:07:25 +02:00
JC Brand
4015eb2fd1 Name anonymous function to fix failing test 2019-09-05 13:12:34 +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
3f0d88e88d Fix ids for the modtools modal 2019-09-04 15:18:51 +02:00
JC Brand
cf7d2fb648 Add webpack.nodeps.js
Use it to generate dist/converse-no-dependencies.js which we use to
generate the converse.pot file.
2019-08-23 21:36:27 +02:00
JC Brand
93de11d167 Dynamically load the dayjs translation.
Also, remove the Promise polyfill. We don't support browsers which don't support promises.
2019-08-23 14:03:52 +02:00
JC Brand
9f054dd767 Update webpack config
- hot reloading
- split config into dev and prod
2019-08-23 13:29:26 +02:00
JC Brand
76f2b66445 Add a po loader for webpack.
- Removes the need for generating and keeping json files
2019-08-23 11:42:37 +02:00
JC Brand
8aaf50d58c Use webpack's dynamic imports feature for fetching emoji JSON 2019-08-23 09:18:10 +02:00
JC Brand
d619012b6b Emojis: Fix failing tests 2019-08-23 07:05:00 +02:00
JC Brand
bb0670c6b2 converse-emoji-views: tweak threshold values 2019-08-22 16:26:10 +02:00
JC Brand
3b40f6964f Update Emoji JSON
* Order by category
* Set odering pre category (instead of just showing them alphabetically)
2019-08-22 16:21:27 +02:00
JC Brand
c01d110501 Avoid interference between username and emoji autocomplete 2019-08-22 14:30:02 +02:00
JC Brand
a59510bbf0 Highlight relevant category when scrolling 2019-08-22 13:56:47 +02:00
JC Brand
2c48096664 Add new spec with emoji tests 2019-08-22 13:56:47 +02:00
JC Brand
e4dc9fa820 Open emojis popup when TAB is pressed on a word starting with : 2019-08-22 13:56:47 +02:00
JC Brand
9099ef89fa Close emoji popup after insertion 2019-08-22 13:56:47 +02:00
JC Brand
73c8002b76 Add search bar for emojis 2019-08-22 13:56:47 +02:00
JC Brand
13d419102a converse-emoji-views: Show categories in chosen skintone 2019-08-22 13:56:47 +02:00
JC Brand
1cf9a936a4 Move Views associated to emojis into a new plugin 2019-08-22 13:56:47 +02:00
JC Brand
d7ce231c51 Various emoji improvements:
* Add emoji tooltip
* Make categories configurable and add smileys category
* Rearrange emoji categories and style
& Show all emojis together
2019-08-22 13:56:47 +02:00
JC Brand
4cb9fd88a8 Refactor emojis so that JSON is fetch asynchronously 2019-08-22 13:56:47 +02:00
Dele Olajide
4e440b0325 Update converse-chatboxes.js 2019-08-19 09:16:19 +02:00
Dele Olajide
f6c5f167f8 Fix Issue #1679
This fix forces Converse.js to respect auto_join_rooms and allow auto join room to occur with server-side generated random room names as required for XEP 0142 - workgroup queues
2019-08-19 09:16:19 +02:00
JC Brand
c9c689aec7 Docstring fixes 2019-08-16 15:44:58 +02:00
JC Brand
4291a45631 Postrelease 2019-08-14 13:15:16 +02:00
JC Brand
8f571ff148 Release 5.0.1 2019-08-14 12:56:44 +02:00
JC Brand
bcc73fe727 converse-muc: occupantAdded promise has been removed
Also:

* converted two docstrings into JSDoc format
* Don't use `_.isNull`
2019-08-14 12:14:02 +02:00
JC Brand
9c024757b6 Bugfix: TypeError: o.getAttribute is not a function converse-chatview.js
can cause messages to not appear.

* Check against null not Element.
* Avoid iterating over non-Element nodes
2019-08-14 12:10:32 +02:00
JC Brand
3faaf6a62b converse-muc: Fetch messages in the initialize method
Lately we've been fetching messages only after entering the MUC, so that
we already have occupants to attach to them (due to `fetchMembers` being
called before) and thereby avoid rerenders.

I've now moved message fetching into the `initialize` method and added
missing event handlers for attaching/removing the occupant from a
message as it comes online or goes offline.

We still avoid (some) rerenders because we fetch and wait for cached
occupants before fetching cached messages and we wait for `fetchMembers`
before triggering `enteredNewRoom` which causes MAM messages to be
fetched.
2019-08-14 11:08:05 +02:00
JC Brand
fa59b22f93 converse-message-view: Move methods from view to model 2019-08-13 15:34:59 +02:00
JC Brand
21a9ea7365 converse-message-view: Add hooks before/after message text transformations 2019-08-13 15:31:05 +02:00
JC Brand
502d2aa064 converse-message-view: Refactor to not use _.partial or _.flow 2019-08-13 11:46:51 +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
cb10c28082 modtools: Test that error renders when not allowed to fetch affiliation list
Also fix scrolling bug
2019-08-12 12:45:12 +02:00
JC Brand
c490ba212d converse-muc: Avoid refetching messages from cache
We want to fetch messages from cache only once. For one-on-one chats
this is the case because messages are fetched only in the `initialize`
method.

This used to be the case for MUCs as well, until we added the option
`clear_messages_on_reconnection`.

Now we only fetch messages after the user has entered the MUC.
2019-08-10 18:47:49 +02:00
JC Brand
e45bd5fc36 converse-roomslist: Handle bookmark not existing 2019-08-10 14:12:20 +02:00
JC Brand
02e50ca3a3 converse-mam: Don't fetch MUC MAM messages on chatReconnected event
By this time the cached messages are not yet fetched, causing the entire
MAM archive to be queried.
2019-08-10 14:12:20 +02:00
JC Brand
ea123e9713 Handle IQ timeouts
* converse-muc: Handle timeout while fetching affiliation list
* converse-omemo: Handle IQ timeout
2019-08-10 14:12:02 +02:00
JC Brand
a407aff33c converse-ping: Refactor and update to reconnect upon ping timeout 2019-08-10 12:26:07 +02:00
JC Brand
aa9aad918f Handle case where bookmark doesn't exist for some reason 2019-08-10 12:06:01 +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
a03e722a24 Add new dev version 2019-08-09 00:58:43 +02:00
JC Brand
bc27b3a36a Release 5.0.0 2019-08-08 18:13:12 +02:00
JC Brand
1bbe52f71c Fixes #1670
Set converse-profile as dependency of converse-omemo
2019-08-08 16:20:55 +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
ade6266de8 Update backbone.overview and strophe.js 2019-08-08 12:45:17 +02:00
JC Brand
720096726d converse-chatboxes: Don't refetch chatboxes upon reconnection
We don't remove the existing chatboxes and upon refetching they
become stale and get removed (by Backbone) and then the UI for
them becomes unresponsive.
2019-08-07 16:12:51 +02:00
JC Brand
c0ef008c4a converse-bookmarks: Call _converse.Collection.prototype.clearSession 2019-08-07 16:12:21 +02:00
JC Brand
b176161ecf converse-roster: Reconnection bugfixes.
Don't remove cached presences in `afterTearDown` event.
We might reconnect again and resume the session, in which case we need
that data still.

Instead, we remove cached presences when `clearSession` fires, because
then we know we're not reconnecting.

When reconnecting, we don't fetch presences from cache, we still have
them (since we no longer remove them in `afterTearDown`).

When reconnecting and not resuming, we clear the presences from cache,
since we're starting a new session.
2019-08-07 16:11:36 +02:00
JC Brand
3dc2b2b695 Bugfix. List of messages need to be passed to api.alert.show 2019-08-07 12:20:20 +02:00
JC Brand
11d8450577 Add note to translators to avoid confusion 2019-08-07 10:52:20 +02:00
JC Brand
dfe8194072 Show spinner when fetching messages by scrolling upwards 2019-08-07 10:47:11 +02:00
JC Brand
271a871a51 Updated i18n po, pot and json files 2019-08-07 10:28:49 +02:00
JC Brand
5cb5ec4640 Fixes #1668. MUC MAM blocked by "info" messages 2019-08-06 23:30:02 +02:00
JC Brand
7bfb172f6e Updates #1548. MAM paging improvements.
* Explicit forwards and backwards paging
* Include upper or lower bound when calling `RSM.prototype.next` or `RSM.prototype.previous`
* Bugfix: Don't override new RSM parameters (caused infinite recursion)
2019-08-06 22:54:51 +02:00
JC Brand
0d2c36dca6 converse-muc: use minimized attr instead 2019-08-06 13:32:52 +02:00
JC Brand
8864925407 Bugfix. Make sure new attrs are applied. 2019-08-06 13:07:41 +02:00
JC Brand
bda567ca01 Fix linting errors 2019-08-05 11:26:48 +02:00
JC Brand
db550b3ec7 Rename controlboxInitialized to controlBoxInitialized
to conform to conventions
2019-08-05 11:10:39 +02:00
JC Brand
ef5ecb2f3a Decouple converse-controlbox and converse-profile 2019-08-05 11:07:38 +02:00
Réda Housni Alaoui
edcb8e28c2 Fix #1664 Blacklisting converse-profile makes the control box totally blank 2019-08-05 11:01:39 +02:00
JC Brand
d90bcd5274 Combine two versions of isOnlyChatStateNotification into one
Also fix a bug in the code dermining whether an XMLElement stanza is only a chat state notification
2019-08-05 10:58:38 +02:00
JC Brand
7a590f7c22 Stop using certain lodash methods.
* _.isNil
* _.noop
* _.isNull
2019-08-05 10:56:22 +02:00
JC Brand
78c7ded2e5 converse-disco: Catch and report errors that happen during tests 2019-08-05 10:33:00 +02:00
JC Brand
021143d6ac Bugfix. Don't clear roster when tearing down
We do that in `clearSession` and otherwise when we auto-reconnect we end
up without a roster.
2019-08-04 01:38:41 +02:00
JC Brand
7861ed7b54 Fixes #1403: Rename show_chatstate_notifications
to `show_chat_state_notifications`
2019-08-03 21:52:14 +02:00
JC Brand
8a9a0a4b19 Add support for paging through MAM results when catching up
Fixes #1548
2019-08-03 21:44:02 +02:00
JC Brand
c7b6bb4773 Only clear messages when clear_messages_on_reconnection is true 2019-08-03 21:43:06 +02:00
JC Brand
c038794fb5 converse-mam: Light refactoring and cleanup 2019-08-03 21:43:06 +02:00
Réda Housni Alaoui
c2db667321 Shadow dom: TypeError: Cannot read property 'parentElement' of null caused by MinimizedChatsToggleView 2019-08-02 16:30:25 +02:00