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
JC Brand
5f0a0138a0
Finegrained config of XEP-0095 CSNs for MUCs as well
2019-08-02 12:05:19 +02:00
JC Brand
ec85490f1c
Allow configuration of which XEP-0095 CSN's may be sent out
2019-08-02 11:34:24 +02:00
JC Brand
550d0ae31b
Bugfix. Chat state should be set to active on chat maximized
2019-08-02 11:15:17 +02:00
JC Brand
6dbc0a0637
converse-dragresize: Remove the resize event listener
2019-08-02 10:47:05 +02:00
JC Brand
3b29e5754d
Don't unnecessarily fetch the roster
...
If we've fetched the roster before within this session, then we don't
have to do so again, regardless of whether versioning is supported or
not, otherwise, even if we have a cached roster, we still need to get
the latest one again.
2019-08-02 10:46:30 +02:00
JC Brand
d5ed1bfafe
Remove the coupling between converse-controlbox and converse-rosterview
2019-08-02 09:12:04 +02:00
JC Brand
0b43082383
Add check and update changelog
2019-08-01 16:26:29 +02:00
JC Brand
cd392bb197
Fixes #1561 Don't clear localStorage and sessionStorage
2019-08-01 11:34:14 +02:00
JC Brand
1bc9a7f809
Ensure JID is set when userSessionInitialized
triggers.
...
Otherwise `converse.features` cache id contains `null` instead of the
user JID and it doesn't clear correctly.
2019-08-01 08:57:34 +02:00
JC Brand
f0f7cfab42
Make the chatbox messages cache key overridable
2019-07-31 17:19:50 +02:00
JC Brand
5b64b5a0e3
The locales URL should be absolute
2019-07-31 16:13:33 +02:00
JC Brand
1eb2364336
Let sendMessage
return the message model, not just the text
2019-07-30 16:15:47 +02:00
JC Brand
afa2543492
Honour the auto_login
flag
...
by not logging in automatically when `auto_login` is `false` and we're
using anonymous, external or prebind authentication.
For `authentication` set to `login` the situation is much more
ambiguous, since we don't have a clear distinction between wether we're
restoring a previous session (`keepalive`) or whether we're
automatically setting up a new session (`auto_login`).
So currently if *either* `keepalive` or `auto_login` is `true` and
`authentication` is set to `login`, then Converse will try to log the
user in.
2019-07-29 16:35:17 +02:00
JC Brand
f12c024b99
Don't query MAM upon every page load.
...
Instead we should only query for newly created chats.
2019-07-29 15:41:03 +02:00
JC Brand
8bd72eed72
Don't keep on refetching roster if the service is unavailable
...
`sendIQ` now takes a flag to turn of rejection of the promise and to
resolve on error IQs instead.
2019-07-29 14:33:37 +02:00
JC Brand
bdbcec65c6
Update JSDoc strings. Combine two methods
2019-07-29 11:36:37 +02:00
JC Brand
aa30e4d9e8
Bugfix. Don't unnecessarily fetch roster again when it's empty
2019-07-29 11:20:33 +02:00
JC Brand
e20b654876
Stop using _.isUndefined
2019-07-29 10:32:29 +02:00
JC Brand
caad85f45b
Manually remove BOSH session tokens from cache
...
even if the `_converse.bosh_session` instance does not exist.
We do this to avoid trying to reconnect with stale tokens upon
reconnection. Especially relevant for anonymous connections, but could
also be applicable when switching between websocket and BOSH connections
when reconnecting.
Also renamed `startNewBOSHSession` to `startNewPreboundBOSHSession`
2019-07-29 10:08:38 +02:00
JC Brand
f9cc51b28a
Bugfix. Make sure that restoreBOSHSession
is always called
...
I.e. also when we're reconnecting.
Otherwise the `_converse.bosh_session` object doesn't get recreated and
we don't cache the BOSH tokens.
2019-07-29 10:05:31 +02:00
JC Brand
179c0810c7
Prioritise logging in with credentials_url...
...
above logging in with passed in JID and password, since the password
might be an expired token.
2019-07-26 20:03:32 +02:00
JC Brand
778b4ff131
Bugfix. Fix check for debounced reconnection
2019-07-26 20:02:56 +02:00
JC Brand
5a48f3da23
Clone auto_join_rooms values before passing in
...
otherwise values get tacked on, causing problems when reconnecting.
2019-07-26 19:30:01 +02:00
JC Brand
6dd4fc5234
Tear down previous session when reconnecting anonymously
...
Because when we reconnect anonymously, we get a new JID, so it's as if
it's a completely new user.
2019-07-26 19:29:01 +02:00
JC Brand
a1d7076e93
Let initConnection wait for for _converse.api.login
...
So that the BOSH connection will be restored before we trigger `connectionInitialized`
2019-07-26 18:57:28 +02:00
JC Brand
fd4ba89182
Reconnect when an anonymous connection drops or fails.
2019-07-26 18:50:19 +02:00
JC Brand
ea36d53f78
Re-add the keepalive
options.
...
It's unlikely that `keepalive` needs to be set to `false`, but there are
some edge cases where it might be useful.
Here's a breakdown of the different configurations of `keepalive` and `auto_join`:
---
* auto_login: false, keepalive: true
This is the default config. Users need to log in manually, but then
Converse will try to reconnect them when the page reloads.
* auto_login: true, keepalive: true
Also very popular configuration. Used with `credentials_url` or `prebind_url`.
* auto_login = `true`, keepalive = `false`
Not sure what this could be useful for. No currently known application.
* auto_login = `false`, keepalive = `false`
Useful when you want some kind of specific action to trigger login, but
you don't want to maintain that state across page reloads.
Also relevant when using a websocket connection with anonymous login.
With websocket it's impossible to maintain anonymous sessions across page
reload because the the session gets removed server-side as soon as the
websocket connection drops and the server won't accept a full JID with
password for an anonymous connection anyway (which could happen upon
page reload when Converse tries to login in again if `keepalive` was `true`).
2019-07-26 18:08:38 +02:00
JC Brand
b6b085189b
Attempt to restore BOSH session or auto_login before...
...
triggering connectionInitialized.
That way, when listening for `connectionInitialized`, we'll know when it
fires whether we've attached to a BOSH connection or not.
2019-07-26 16:43:35 +02:00
JC Brand
c4ad02d4e3
New config setting: muc_fetch_members
2019-07-26 13:32:21 +02:00
JC Brand
c5193be44b
Add postrelease
make recipe to show dev version number in app
2019-07-25 13:45:51 +02:00
JC Brand
fa2d6cca10
Update developer documentation and buildout dependencies
2019-07-25 12:33:46 +02:00
JC Brand
2546622da3
Trigger events when resizing starts
2019-07-25 06:46:05 +02:00
JC Brand
45e19acfb1
Use cursor: pointer
instead of href="#"
2019-07-24 14:09:53 +02:00
Stanislav
d9e0b63683
Fix: use JID from credentials when credentials_url is set ( #1638 )
...
* Fix: async SetUserJID
2019-07-23 15:26:46 +02:00
JC Brand
643c40f260
Respect auto_login
after finishInitialization
.
...
If `auto_login` is false, we shouldn't log in, so we only try to log in when
it is true. Otherwise we still try to restore the BOSH session (if applicable).
2019-07-23 11:51:51 +02:00
JC Brand
18a2c8858a
Make attemptNonPreboundSession
and autoJoin
functions
...
rename `autoJoin` to `connect`
2019-07-23 10:19:15 +02:00
JC Brand
e4eafe9e91
Simplify attemptNonPreboundSession
...
- Split between `login` auth and the rest (`external`, `anonymous`, `prebind`)
- It doesn't make sense to pass along credentials when not using `login` auth so avoid that flow.
- It's not necessary to pass the `reconnecting` flag to `attemptNonPreboundSession`
2019-07-23 10:18:47 +02:00
JC Brand
9be43ccea7
Don't inform of role change which accompanies an affiliation change
...
given that it's implicit and can cause confusion
2019-07-22 18:45:30 +02:00
JC Brand
bcbff1b024
Don't assume user had voice before
2019-07-22 16:51:44 +02:00
JC Brand
07f82d6a0d
Allow passing of more options to auto_join_rooms
2019-07-22 15:10:59 +02:00
JC Brand
3817f471a0
Two session related fixes.
...
* Don't set JID resource when logging in anonymously. The resource will be set by the server.
* Don't wipe the `id` from the session when clearing it.
2019-07-22 14:43:30 +02:00
JC Brand
2fca442f57
Also render bottom panel when own occupant is added
...
So that we can remove the textarea if we're a visitor in a moderated room.
2019-07-12 13:50:39 +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
2849adf857
Stop debouncing show
...
Instead optimize in other ways.
Also:
- Don't fade in when `animate` is false.
- `trimChats` now gets called in `afterShown`.
- Add now event `beforeShowingChatView`
2019-07-12 12:42:41 +02:00
JC Brand
3a2bf766a0
Add new test utility waitUntilBookmarksReturned
2019-07-12 10:38:07 +02:00
JC Brand
06717370f1
Provide a traceback when waitUntil
times out
2019-07-11 23:42:26 +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
8a98ef87fe
Various small fixes. (Unused imports, unused vars etc).
2019-07-11 12:37:17 +02:00
JC Brand
802f2b24f5
converse-muc: Update sendConfiguration
to not take callbacks
2019-07-11 11:01:51 +02:00
JC Brand
d95a7987ce
Fix linting errors and add @module
jsdoc directives
2019-07-11 10:48:52 +02:00
Malcolm
b016aa0f7d
FIX OEMO default setting in wrong place ( #1476 )
2019-07-11 09:11:22 +01:00
JC Brand
8938245cdd
Update various dependencies to their latest versions
2019-07-11 09:46:17 +02:00
JC Brand
8a405ee88c
Various bugfixes based on the previous refactoring.
...
These two commit should ideally be one, but I inadvertently pushed to
remote too early.
2019-07-10 16:55:55 +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
Malcolm
b163d05323
ADD Omemo default support ( #1476 )
2019-07-10 06:51:41 +01:00
JC Brand
a16c068313
Bugfix. Handle null
passed in as attrs
to api.rooms.create
2019-07-09 13:45:34 +02:00
JC Brand
168f29cf06
Only call credentials_url
when authentication
is set to login
...
Also update to newer strophe.js version which contains a bugfix.
2019-07-09 12:47:09 +02:00
JC Brand
5c88d3e836
Add role and affiliation classes to message DOM element
2019-07-08 13:58:15 +02:00
JC Brand
de1071bd4a
Add isModerator
method on the occupant model
2019-07-08 13:57:10 +02:00
JC Brand
216a67c165
Only show leave notifications when we're in the MUC
...
Otherwise when `removeNonMembers` gets called as we reconnect, we get a
long list of erroneous leave notifications.
2019-07-08 13:33:59 +02:00
JC Brand
6bfa69ab3b
Bugfix. Wait for members before fetching messages
2019-07-08 13:23:56 +02:00
JC Brand
3ca6ac7f50
Fixes #1524 Don't include own device in OMEMO message
...
This change reverts the significant part of 1dfdb36d20
I can't say that I understand why libsignal throws `Error: Invalid signature`
when you try to build a session for your own (sending) device, but given that
messages can only be decrypted once, I guess it isn't really necessary
to encrypt for your own device, since you already have the plaintext.
In addition I've added some error handling so that we can recover
gracefully when session building fails for a subset of devices.
2019-07-05 19:21:05 +02:00
JC Brand
1c50d4d7a1
Bugfix. Numbers aren't delineators for mentions
2019-07-04 08:28:12 +02:00
JC Brand
f17edee827
Bugfix. Should be possible to kick/ban/etc without providing a reason
2019-07-04 08:28:12 +02:00
JC Brand
89ef9a18c4
Call destroy
for the models instead of remove
on the collection
...
So that the models get removed from the browser cache.
Otherwise they get re-fetched when we reconnect.
2019-07-04 08:28:12 +02:00
JC Brand
e5188d8b10
Bugfix. Remove affiliation based on updated members lists
2019-07-04 08:28:12 +02:00
JC Brand
da1d87648c
New config option clear_messages_on_reconnection
...
In some cases, it might be desirable to clear cached chat messages once you've
reconnected to the XMPP server.
For example, if you want to prevent the chat history from getting too long or
if you want to avoid gaps in the chat history (for example due to MAM not
returning all messages since the last cached message).
If you're using OMEMO, then you probably don't want to set this setting to
``true``. OMEMO messages can be decrypted only once, so if they then
subsequently get cleared, you won't get the plaintext back.
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
e7178fed31
Fetch messages after fetching members.
...
This is done to avoid unnecessary repaints and reflows (caused when a
message has already rendered and then an occupant is created and
attached to that message, cauring a re-render).
Related to #1266
2019-07-04 07:58:24 +02:00
JC Brand
cd6b5143c6
Create separate models for MUC messages and their container
2019-07-04 07:58:24 +02:00
Kim Alvefur
28b51f75ce
Support sending files from clipboard ( fixes #1585 )
2019-07-03 23:46:24 +02:00
JC Brand
0d75cc5235
Fixes #1622
...
Make selector more general because Ejabberd returns `error[type="modify"]` instead of `error[type="cancel"]`.
2019-07-01 17:59:02 +02:00
JC Brand
34a404eecc
URI encode query string values
2019-07-01 17:21:49 +02:00
JC Brand
63d258a00a
Use findWhere
when looking for only one instance
2019-07-01 17:21:47 +02:00
JC Brand
bb94891621
Only remove non-members when reconnecting to a MUC
...
to avoid unnecessarily destroying and then recreating ChatRoomOccupant
instances for room members.
2019-07-01 09:16:15 +02:00
JC Brand
f1f641ce61
Makes more sense to destroy a message outside of showMessage
...
Also ensures that we don't trigger `messageAdded` for a destroyed
message.
2019-06-28 15:24:08 +02:00
JC Brand
8db839b4cf
Send a XEP-0410 ping when we restore a MUC from cache
...
and re-enter if necessary.
This solves the problem where we "clone" a tab (e.g. middle-click) and
then restore a MUC from cache which we haven't actually entered (given
that the new tab represents a new device and session).
Also... add `await` in a test to try and fix Travis flakiness
2019-06-27 16:50:44 +02:00
JC Brand
836d3946e8
Ignore keycodes if meta key is also pressed
2019-06-27 16:09:11 +02:00
JC Brand
0d928edf7e
Disconnect MUCs when we don't have a resumable SMACKS session
2019-06-27 15:49:19 +02:00
JC Brand
ec68dc1cf0
Always set JID on the connection
...
So that the resource is passed along when we manually bind.
Related to bd81b89724
2019-06-27 15:19:48 +02:00
JC Brand
119966d902
Set flag to indicate user session is active
...
We then use this flag to determine whether we should use the values from
sessionStorage.
This appears to fix the problem I originally tried to fix in 607d798665
.
When "cloning" a tab (e.g. via middle-click), the `active` flag will be
set and we'll create a new empty user session, otherwise it'll be false
and we can re-use the user session.
2019-06-27 15:13:04 +02:00
JC Brand
8d9d0a1ef4
Revert "Store session per full JID"
...
This reverts commit 607d798665
.
Unfortunately this doesn't solve the issue because we have a
chicken-and-egg problem due to not knowing the resource beforehand.
So what happens after this change is that we never resume XEP-0198
sessions but instead always start a new one.
2019-06-27 15:11:14 +02:00
JC Brand
98215deb21
Update to latest backbone.overview which debounces sorting on add
event
2019-06-27 13:15:55 +02:00
JC Brand
11da69b0d7
Use native methods instead of DayJS
...
Results in a 4x speedup
2019-06-26 17:52:48 +02:00
JC Brand
824b2c81b4
converse-minimize: Rename view methods to clarify
...
that they are in response to a change and not meant as an API.
2019-06-26 16:52:51 +02:00
JC Brand
bd81b89724
Ensure current resource is bound when manually calling connection.bind
2019-06-26 13:48:10 +02:00
JC Brand
2cbc4aaa50
Fixes #1494 . Trim whitespace around messages
2019-06-26 10:59:56 +02:00
JC Brand
83bc851f20
Fixes #1455 . Updates #1619
...
Avatar didn't update a second time due to `canvas` element being expected
2019-06-26 10:24:27 +02:00
JC Brand
b69440f875
converse-smacks: Ensure default session values are set
2019-06-25 23:58:45 +02:00
JC Brand
c759112cf3
Fix failing test
2019-06-25 22:53:39 +02:00
JC Brand
607d798665
Store session per full JID
...
Otherwise we run into a bug where two tabs with Converse.js share the
same XEP-0198 SM-ID, causing both to go into a reconnection-loop as
the XMPP server switches XEP-0198 sessions between them.
This bug is due to a distinction in how sessionStorage behaves when you
open the existing site in a new tab (e.g. middle-click or
`target="_blank"), as opposed to creating a new tab
and then opening the site in that tab.
In the latter case, the newly created sessionStorage object is empty.
In the former, the contents of sessionStorage of the current page is
copied over to the new page!
2019-06-25 21:40:28 +02:00
JC Brand
54804b5b89
Performance fix. Only set height when necessary
2019-06-25 17:24:07 +02:00
JC Brand
e83b0ff39e
Update wording to clarify what /revoke means
2019-06-25 16:59:00 +02:00
JC Brand
681c3a2c12
Corrections bugfix. Don't save new id
on message model
...
otherwise a new cache entry gets created, causing multiple messages to
be restored from cache later on.
2019-06-25 12:06:47 +02:00
JC Brand
1bc3f28e6f
Update refreshFeatures
...
Distinguish between getting an existing entity and
creating a new one.
When creating a new one, ensure that we don't fetch from the cache.
New API method for creating a disco entity.
2019-06-25 11:43:59 +02:00
JC Brand
1a23ec1462
Move line from parent method into showMessage
2019-06-25 11:43:59 +02:00
JC Brand
996a43792e
converse-mam depends on converse-rsm
2019-06-20 16:51:50 +02:00
JC Brand
29b6a6724d
Need to explicitly fetch messages now when restoring a MUC from cache
2019-06-20 16:36:26 +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
ac007bb527
converse-disco: don't replace a pending promise
...
I'm not sure how much this is an issue outside of tests, where we might
run into race conditions arising to the fact that we don't always
respond to every IQ stanza
2019-06-20 14:04:46 +02:00
JC Brand
c5309f9210
Add attributes to resolveable promise to detect its resolved state
2019-06-20 14:04:46 +02:00
JC Brand
c32070c9bb
Autocomplete fixes
...
- Fixes #1575 . Height not properly set on MUC invitation list
- Add new configuration setting: `muc_mention_autocomplete_min_chars`
- Bugfix. `min_chars` setting for MUC mentions wasn't having an effect
2019-06-19 15:01:30 +02:00
JC Brand
36549bf61d
Revert flexbox
, column-reverse
changes
...
Unfortunately this doesn't work on Firefox and there's no proper
workaround. https://github.com/philipwalton/flexbugs/issues/108
Reverts:
Revert "Bugfix. Properly insert error messages and spinner"
This reverts commit 6a419cc145
.
Revert "Use flexbox to keep the chat scrolled down"
This reverts commit dd91d3cc55
.
2019-06-19 11:45:54 +02:00
JC Brand
303a8b63af
Fixes #1495 . Mentions should always include a URI attribute
2019-06-19 09:35:39 +02:00
JC Brand
7455ce1b07
Fixes #1579 and fixes #1538
2019-06-19 09:24:44 +02:00
JC Brand
30d110434f
Bugfix. Properly resize textarea when text gets removed.
2019-06-19 09:03:52 +02:00
JC Brand
9750dcf3a8
Fixes #1142 . Show confirmation dialog for editing messages
...
when the textarea contains an unsent message
2019-06-19 08:43:42 +02:00
JC Brand
1dc73c1c31
For chatboxes, use the web storage determined by _converse.trusted
2019-06-18 16:46:55 +02:00
JC Brand
b2553a44e1
New configuration setting: auto_focus
2019-06-18 14:04:26 +02:00
JC Brand
536b42697c
Manually scroll down when switching fullscreen chats
2019-06-18 13:59:55 +02:00
JC Brand
4f67f352f5
Fix /${command}
parsing bug
2019-06-18 13:01:38 +02:00
JC Brand
6a419cc145
Bugfix. Properly insert error messages and spinner
...
now that messages appear in reverse order due to flexbox
2019-06-18 12:35:58 +02:00
JC Brand
dd91d3cc55
Use flexbox to keep the chat scrolled down
...
By using `display: flex` and `flex-direction: column-reverse`, the chat
now automatically scrolls down when loaded, without requiring any
extra JavaScript.
We still need to scroll down with JavaScript when sending a message.
By using `column-reverse`, the messages container now works in reverse.
So the newest message is the first element in the container and the
oldest message is the last. This is the reverse of before.
Due to this, this change will likely break some plugins.
2019-06-18 11:37:07 +02:00
JC Brand
21b0f2464d
Clear received
field for corrected messages
...
It gets populated again upon MUC reflection or chat marker
2019-06-17 12:14:31 +02:00
JC Brand
9c66302c4a
Bugfix. Error responses weren't being shown for corrections
2019-06-17 12:07:33 +02:00
JC Brand
19f6bce246
Message correction improvements. Updates #1142
...
Up and down arrows only serve as message correction shortcuts if the
textarea is empty.
This means that:
- Up arrow doesn't start correction of previous message if we're currently writing a message
- Down arrow doesn't erase currently written message
This is based on user-feedback and is also how Slack handles these
shortcuts.
2019-06-17 09:04:03 +02:00
JC Brand
38d0d8360b
New config setting message_limit
...
for limiting messages to a certain number of characters.
2019-06-16 21:52:56 +02:00
JC Brand
de3099a9d8
converse-muc: Show <text>
content of error presences
2019-06-16 12:14:32 +02:00
JC Brand
1d6ee5bf58
No need to mention 'permanent'
2019-06-16 11:23:36 +02:00
JC Brand
a19e35d101
Use setTimeout instead of listening for animationend
...
For some reason the latter causes extreme lag when switching rooms
2019-06-14 13:46:53 +02:00
JC Brand
83201e7c02
Reconnection fixes.
...
When reconnecting with a new transport, we call setUserJID
so that a new resource is generated, to avoid multiple
server-side sessions with the same resource.
We also call `_proto._doDisconnect` so that connection event handlers
for the old transport are removed.
2019-06-14 12:00:49 +02:00
JC Brand
9635f53dad
converse-smacks: 2 bugfixes.
...
- Don't ever resume SMACKS stream when using BOSH
- Clear SMACKS session data when using BOSH
2019-06-14 12:00:49 +02:00
JC Brand
d3692755d0
Consolidate changed event handler that renders MUC heading
2019-06-14 09:27:10 +02:00
JC Brand
946394928b
Fixes #1601 Message corrections should get their own origin id
2019-06-13 16:31:02 +02:00
JC Brand
22bdccc775
Bugfix.
...
https://xmpp.org/extensions/xep-0198.html#resumption
The <resume/> element MUST include a 'previd' attribute whose value
is the SM-ID of the former stream and MUST include an 'h' attribute
that identifies the sequence number of the last handled stanza sent
over the former stream from the server to the client.
2019-06-13 13:54:58 +02:00
JC Brand
f3c4dbc344
Avoid unnecessarily sending out a presence stanza
...
- Set roster_fetched flag when we get an empty IQ[type="result"] stanza
- Set `restored` flag when resuming in converse-smacks
- Don't trigger change event when fetching xmppstatus values
- Removed two events, since we can just listen to `change` on `_converse.xmppstatus`.
2019-06-13 13:33:01 +02:00
JC Brand
ba9d28b5c2
Two MUC tests
...
- Test for info message indicating a configuration change
- Test that the MUC reconnects when a `not-acceptable` error is returned
2019-06-12 18:39:24 +02:00
JC Brand
ca4b509d87
Log MUC connection status
2019-06-12 10:55:01 +02:00
JC Brand
5362156731
While connecting, treat "modify" error as a disconnection event
2019-06-12 10:15:55 +02:00
JC Brand
73fd3d6a5f
Fade out ephemeral messages
2019-06-12 07:09:22 +02:00
JC Brand
9d3dfa831a
Fixes #1599
2019-06-12 06:40:53 +02:00
JC Brand
e1ca02d94a
converse-disco: don't call onInfo on undefined
2019-06-12 06:27:07 +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
970ba96ce1
Bugfix. Only create VCards for chat
and groupchat
messages
...
Other types of messages such as `error` don't necessarily have a JID
tied to them.
2019-06-11 14:05:30 +02:00
JC Brand
a0f0240b92
Don't set nick before confirmation that it was successful
2019-06-11 14:05:30 +02:00
JC Brand
d385452a7d
Use _converse.getDefaultMUCNickname
2019-06-11 14:05:30 +02:00
JC Brand
599f7596f6
Show policy violation errors to the user and make them ephemeral
...
Also, remove ephemeral messages after 10 seconds, not 20
2019-06-11 14:05:07 +02:00
JC Brand
3cc1b40aad
Apparently no model triggers showHelpMessages
anymore
2019-06-11 10:34:23 +02:00
JC Brand
dc0085bff3
All received MUC messages are "received" by definition
2019-06-06 16:17:51 +02:00
JC Brand
690052e1c2
Call setUserJID
when we get JID from credentials_url
2019-06-06 13:41:52 +02:00
JC Brand
789b47ddb3
Bugfix. Don't create view for chat which fails validation
...
Use-case is when an invalid MUC gets opened in singleton mode.
Without this fix a new chat with spinner appears, even though it
shouldn't.
2019-06-06 08:34:56 +02:00
JC Brand
a656750459
Only fetch presences when we're resuming an existing session.
...
updates #555
2019-06-05 11:47:23 +02:00
JC Brand
a7184fab41
Bugfix. Need to wait for setUserJID
2019-06-05 11:38:14 +02:00
JC Brand
38a232fd45
Move BOSH code into a plugin
...
- Remove the `keepalive` configuration setting. It is now always implicitly `true`.
- Remove the `expose_rid_and_sid` configuration setting.
- A `prebind_url` is now mandatory when setting `authentication` to `prebind`.
- It's no longer possible to pass in `rid` and `sid` values to `converse.initialize.
2019-06-05 11:35:48 +02:00
JC Brand
01fce55733
Add prettierx and tentatively use it for some formatting
...
I'm using prettierx, which is a fork of prettier so that we can have
spaces before the brackets in a function declaration.
I don't like how restrictive prettier is concerning its configuration
and formatting.
- it messes up some indentation in specs/
- it removes a second newline when I specifically want to have two
- it doesn't allow spaces before brackets in function declarations (hence prettierx)
- it adds spaces for function parameters with default values
None of this is configurable.
So auto-formatting is not turned on by default, but it might be a useful
tool in some cases.
Fixes an issue where indentation was off in converse-core.js, causing
vim-sleuth to wrongly indent by three spaces only.
2019-06-05 10:25:31 +02:00
JC Brand
085a4c6535
Small config fixes
...
- fix import path
- remove unnecessary lines in webpack config
- remove unused file
2019-06-04 20:35:09 +02:00
JC Brand
51f2ab9100
Fixes #1196 . Use alternative connection method upon connfail
2019-06-04 15:11:32 +02:00
JC Brand
297f3d9efb
The list of core plugins doesn't have to be an attribute of _converse
2019-06-04 14:27:25 +02:00
JC Brand
b57e3e49c1
Fixes #1330 . Missing room name in MUC invitation popup
2019-06-04 12:08:14 +02:00
JC Brand
b128286410
Don't disconnect MUC on unload when using SMACKS
...
updates #1111
2019-06-04 11:12:22 +02:00
JC Brand
1d9bbb8ddd
Message display improvements
...
* Checkmark and edit modal button are now on the right
* Instead of showing checkmarks for MUC messages,
we now show them as light grey before MUC reflection
* Simplify message markup by requiring less `if` statements
2019-06-04 11:12:22 +02:00
JC Brand
f2ac9ef4d7
converse-muc: Support for XEP-0410 to check whether we're joined
2019-06-03 11:41:34 +02:00
JC Brand
68d4a71c75
Fix _converse.api.user.login
to handle auto_login case
...
Also, set the resource in `setUserJID`
2019-06-03 11:40:26 +02:00
JC Brand
3c6a17f85c
Update to latest Strophe commit with explicit bind support
2019-06-03 10:02:57 +02:00
JC Brand
699fe0df63
Initial support for the CredentialsContainer web API
2019-06-03 09:43:24 +02:00
JC Brand
737e27c726
Use shakespearean character names in tests
2019-06-03 09:43:24 +02:00
JC Brand
5738b3748a
Use getDisplayName
for roster contacts
2019-06-03 09:43:24 +02:00
JC Brand
1fb5378524
Throw error on parser error in toStanza
2019-06-03 09:43:24 +02:00
JC Brand
f30d415f76
Refactor reconnection
2019-06-03 09:43:24 +02:00
JC Brand
55cffab594
Destroy session objects in clearSession
, not in tearDown
2019-06-03 09:43:24 +02:00
JC Brand
dc58e6d47f
Make teardown a function
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
a46ee4dfe1
Buttons aren't always there
2019-06-03 09:41:29 +02:00
JC Brand
7c7002ebf9
Add _converse.default_connection_options
...
So that we can specify defaults
2019-06-03 09:41:29 +02:00
JC Brand
eafe995f95
Rename variable for clarity
2019-06-03 09:41:29 +02:00
JC Brand
24956d8dca
Execute manual resource binding if necessary
2019-06-03 09:41:29 +02:00
JC Brand
0688907e0d
Allow events to be synchronous
...
When a synchronous event is fired, Converse will wait for all
promises returned by the event's handlers to finish before continuing.
2019-06-03 09:41:29 +02:00
JC Brand
6dea4eabe7
Ensure nickname form is rendered across page loads
...
if the page is reloaded while the nickname form is shown
2019-06-01 16:16:34 +02:00
JC Brand
267fb38e0c
Remove the forward_messages
config option
2019-05-31 16:07:51 +02:00
JC Brand
e362776b9f
converse-muc-views: Don't prematurely insert MUC into the DOM
2019-05-31 09:14:42 +02:00
JC Brand
d86a657a66
converse-controlbox: No need anymore to override insertIntoDOM
...
We now use CSS to make sure that the controlbox and toggle is always on the far right.
2019-05-31 09:14:07 +02:00
JC Brand
aece956281
Refactor strophe usage
...
- Upgrade to latest commit in Strophe
- Import individual Strophe dependencies
- Replace strophe plugins with code in Converse
2019-05-29 18:27:34 +02:00
JC Brand
7a18f59f8f
Simplify rendering of trimmed chats
...
Also fix issue where trimmed headline chatboxes don't show the proper
color
2019-05-29 13:28:45 +02:00
JC Brand
da713f3162
Improve chatroom name rendering
...
- Take locked_muc_domain into consideration in chatroom display name
- Use getDisplayName when rendering the heading name
- Give preference to bookmark name if it exists
2019-05-29 13:27:41 +02:00
JC Brand
2834e8d678
Bugfix. Single emoji messages don't display larger when restored from cache
2019-05-28 15:38:55 +02:00
JC Brand
7511d8c35e
Always clear messages and occupants cache before (re)entering a room
2019-05-28 14:30:55 +02:00
JC Brand
e053b97043
Set room `connection_status' to DISCONNECTED...
...
when receiving an `unavailable` presence for ourselves.
2019-05-28 14:30:55 +02:00
JC Brand
85c4d144ed
Only show mention autocomplete suggestions for MUC occupants with nicks
2019-05-27 22:45:54 +02:00
JC Brand
fcc9e8c31b
Also allow @
in moderator commands
2019-05-27 12:27:24 +02:00
JC Brand
be0274f1f0
Fixes #1586 . Not possible to kick someone with space in nick
...
Refactored moderation by moving certain methods to the model and
consolidating setting of roles and affiliations into new methods.
2019-05-27 12:27:12 +02:00
JC Brand
5e6c2b9982
Move role modifying method to the model
...
and also first check whether we have an occupant with that nickname.
Since roles are session based, it doesn't make any sense to try to
modify the role for a user not in the room.
2019-05-27 12:27:03 +02:00
JC Brand
f20aee6906
Fixes #1576
...
When using `auto_login` and logging out, Converse gets stucks with an infinite spinner.
2019-05-26 15:30:15 +02:00
JC Brand
22e3c49660
Terminology fix
2019-05-26 11:20:31 +02:00
JC Brand
e1762a1bb5
Rename key event handler methods to avoid confusion
2019-05-26 11:09:43 +02:00
JC Brand
5054ecca08
Check whether controlbox exists before assigning
2019-05-24 20:50:30 +02:00
JC Brand
f387c947f5
Allow the full app to be embedded.
...
- new config option `singleton`.
- new plugin `converse-uniview`
- removed `converse-embedded`.
- various CSS changes, to properly render an embedded full app
- don't re-open cached and non-autojoined chats in singleton mode
The goal here is to extend the `embedded` `view_mode` so that the full app can
also be embedded, not just a single MUC or private chat.
To do this, we'll need to differentiate between multi and singleton chat apps.
* A singleton chat app contains only a single chat.
* A multi-chat app can contain zero or more chats
So we introduce a new config option, `singleton`, which when used with
`view_mode` set to `embedded` will determine whether a single chat or the full
app is embedded.
Similarly, in `overlayed`, `fullscreen` and `mobile` view modes, `singleton`
set to true will allow only one chat within the parameters of that view mode.
We're appropriating the word `singleton` and introducing the concepts of
`uniview` and `multiview` (see a785ca8) to cover what was
previously meant with `singleton`.
updates #1297
2019-05-24 20:39:19 +02:00
JC Brand
2d507c68c9
Always debounce trimChats
2019-05-24 16:02:07 +02:00
JC Brand
1ef29bee4e
Use composition instead of overrides
2019-05-24 16:02:07 +02:00
JC Brand
f0a680e492
Remove animate
config settings.
...
Also update tests
2019-05-23 22:02:08 +02:00
JC Brand
04af3eb029
Always try to reserve nickname when entering room
...
Allows for simpler code, especially making `getReservedNick` easier to override
2019-05-23 16:04:55 +02:00
JC Brand
b876500865
Update to latest backbone.overview
2019-05-23 14:44:10 +02:00
JC Brand
7032ded53f
cleanup
2019-05-22 19:45:00 +02:00
JC Brand
a1c33d2140
No need to explicitly call refreshFeatures
...
`initializeDisco` already gets called upon reconnection which
accomplishes this.
2019-05-22 19:30:22 +02:00
JC Brand
9167128d8e
Bugfix.
2019-05-22 19:28:09 +02:00
JC Brand
429c320a79
Also clear MUC occupants upon reconnection
2019-05-22 19:27:53 +02:00
JC Brand
7ab59ad63e
Refactor MAM and clear private chats upon reconnection
...
- Add `onReconnected` method for chatboxes to clear messages
- Move MAM models to headless build.
- New event `onChatReconnected`
2019-05-22 14:10:19 +02:00
JC Brand
271c79eae8
Refactor message corrections
...
- Save date for older message versions and display it in the modal
- Properly handle the correction being received *before* the corrected message
2019-05-22 13:26:46 +02:00
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
4c924a66df
Split bookmarks plugin into headless and views
...
Fixes #1577
2019-05-21 11:35:00 +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
886ff1bd19
Don't debounce reconnect
on leading edge
...
Otherwise we can get into a situation where Converse stops trying to
reconnect.
2019-05-20 15:16:36 +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
3085c5d408
Catch errors when destroy
is called for already removed message
2019-05-19 21:43:03 +02:00
JC Brand
84bde6e766
Move some close
logic to the model
2019-05-18 07:09:53 +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
7950f7c2ac
Change muc_show_disconnection_status
to muc_show_join_leave_status
2019-05-18 06:34:29 +02:00
JC Brand
f7b19053ec
Use origin_id
as id
for outgoing messages as well
2019-05-18 05:32:04 +02:00
JC Brand
a0f1a5cfaf
Fetch chat messages in the model, not the view
2019-05-17 14:45:37 +02:00
JC Brand
e7ceb22a56
Avoid duplication by keeping track of message views
2019-05-17 14:45:37 +02:00
JC Brand
0fa6bcdcc2
Reduce debounce time for scrolling down.
2019-05-17 14:45:37 +02:00
JC Brand
bad9b08b61
disable_mam
should now be set on the model
2019-05-17 13:53:31 +02:00
Christoph Scholz
038359c74f
fix foreach in fileupload
2019-05-16 15:22:35 +02:00
JC Brand
16db6195d3
Move MAM methods to the model
2019-05-16 12:01:46 +02:00
JC Brand
94bea16cc4
Remove chatBoxOpened
event
2019-05-16 11:54:42 +02:00
supun19
d1572f3506
iOS viewport was less than 100vh so had to redefine vh units
...
fixes #1571
2019-05-15 18:32:11 +02:00
JC Brand
ceb9d12957
Don't store ChatRoomOccupants on ChatRoomView
...
Helps with enforcing discipline of keeping them separate
2019-05-15 15:55:47 +02:00
JC Brand
7cd69726a8
Loosen coupling between ChatRoomOccupantsView and ChatRoomView
...
Hide/show the sidebar based on state and not imperatively in ChatRoomView
2019-05-15 14:50:12 +02:00
JC Brand
9a94e5b47e
Bugfixes in fetching of occupants
2019-05-15 14:30:43 +02:00
JC Brand
385a82f432
Bump strophe.js to 1.3.3
2019-05-15 09:50:17 +02:00
JC Brand
1bc425e596
Fetch cached occupants in the model instead of the view
2019-05-15 09:34:52 +02:00
JC Brand
69e8b071d8
Minor cleanups
2019-05-14 20:31:43 +02:00
JC Brand
12989ab241
New event: chatBoxBlurred
2019-05-14 16:26:25 +02:00
JC Brand
86f3399dc0
Also trigger 'chatboxFocused' when user manually focuses
2019-05-14 16:24:16 +02:00
supun19
dd0821076d
Groupchat auto-configuration now supports list-multi fields
2019-05-14 15:28:06 +02:00
JC Brand
1d9e1a62df
Only show new moderator status when not already admin or owner
2019-05-14 13:55:19 +02:00
JC Brand
14708af715
Refactor callback method into instance method
2019-05-14 13:54:19 +02:00
JC Brand
d0ddda8244
New config option muc_show_disconnection_status
2019-05-14 13:29:43 +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
d98b33de0a
Trigger will-connect
event inside reconnect
method.
...
Also add docstrings.
2019-05-14 10:31:41 +02:00
JC Brand
4f705369bd
Replace _.each and _.map with native methods
2019-05-13 20:16:39 +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
d91a5ca6de
Remove alias for xss
. Upgrade pluggable.js to version 2.0.1
2019-05-13 18:54:00 +02:00
JC Brand
7a990ae0b9
Fixes #1558 , this.get
is not a function
2019-05-13 14:37:48 +02:00
JC Brand
84472ab752
Bugfix. npm install converse.js
failed
...
because @converse-headless wasn't available
2019-05-10 15:26:50 +02:00
JC Brand
587dddd81d
Update to latest version of Strophe
...
which logs less on the INFO loglevel
2019-05-10 13:26:30 +02:00
JC Brand
0e7d64818d
Add NPM scripts so that we can build dist files
2019-05-10 12:57:30 +02:00
JC Brand
145ee88213
Start handling error presences in MUC model
2019-05-09 12:18:36 +02:00
JC Brand
c520a4e39b
Trim nickname
2019-05-08 21:37:47 +02:00
JC Brand
77e58bff5f
Test that MAM messages are fetched when a chatbox is opened
...
This is a precursor to also testing (and implementing) that a chat pages
through MAM results (see #1549 )
Remove unused method.
2019-05-07 10:27:51 +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
laszlovl
565f7d9f74
Make sure the time attribute for MAM message is parsed through moment
...
Messages (received directly or via MAM) are stored in a backbone
collection that's kept sorted by the message's "time" attribute.
Various parts of the codebase rely on this behavior.
For regular messages, the time attribute is generated by
`moment().format()`, which generates a timestamp in the browser's
local timezone, for example "...+02:00".
For MAM messages, we would previously copy the "delay.stamp" value
into the "time" attribute verbatim. However, that value is generated
by the server and is unlikely to be in the same timezone locale.
ISO timestamps expressed in different timezones cannot be sorted
lexicographically, breaking the premise of keeping the messages
collection sorted by time.
2019-05-05 15:44:20 +02:00
JC Brand
15b2273631
_converse.api.archive.query
now returns a Promise
...
instead of accepting a callback functions.
2019-05-03 19:47:49 +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
JC Brand
273b9584c0
Refactor onMessage to use const
instead of let
2019-05-03 14:12:26 +02:00
JC Brand
52ea8d5ab6
Fixes #1550
...
Legitimate carbons messages blocked due to erroneous forgery check
2019-05-03 14:11:29 +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
9c4f8aef23
Bugfix. Call _converse.reconnect regardless
...
it is debounced and otherwise we might enter a state where reconnection
no longer happens.
2019-05-02 16:50:58 +02:00
JC Brand
d868b9a9f7
Continuously retry to fetch login credentials
2019-05-02 14:53:42 +02:00
JC Brand
3290d6659f
Bugfix. validation message should be set on the model
2019-05-02 14:53:07 +02:00
JC Brand
969f902d4a
Playing around with removing more lodash calls
2019-04-29 09:47:46 +02:00
JC Brand
ba6de8844e
Use Object.keys instead of _.keys
2019-04-29 09:29:40 +02:00
JC Brand
34469425d6
Use Object.assign instead of _.extend
2019-04-29 09:07:15 +02:00
JC Brand
51d0dc8d23
No such method disconnect
2019-04-27 18:09:59 +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
dedede56f8
Rename muc_disable_moderator_commands
to muc_disable_slash_commands
...
Since those commands aren't only about moderation
2019-04-25 11:32:07 +02:00
JC Brand
c72dc74022
In the menu, only show allowed commands
2019-04-25 10:48:33 +02:00
JC Brand
3bd9e09fd7
Don't wipe the nickname value when rerendering the form
...
Ideally Snabbdom wouldn't completely replace the input when we add the
`error` class, because that's what's causing the input value to be
cleared.
2019-04-25 08:35:44 +02:00
JC Brand
3ad93b56b3
Clicking the wrench icon again closes the config form
2019-04-24 14:51:12 +02:00
JC Brand
d311e14013
Render MUC forms with Backbone.VDOMView
...
That way we don't lose the user's input values, we avoid flashing and we
avoid unnecessary rendering.
In the process, fixed an annoying issue where Chrome auto-completes
what it thinks is the username into the "Language Tag" field of the MUC
config form.
Instead we tell Chrome that the MUC JID is the username, thereby also
letting it save the password to to that JID.
2019-04-24 14:51:12 +02:00
JC Brand
66adf03557
Bugfix. Order of operations.
2019-04-24 10:05:18 +02:00
JC Brand
e189acc8c9
Returning nick with credentials_url complicates things too much
2019-04-23 14:53:48 +02:00
JC Brand
741be5cc04
converse-muc: Handle VCards not being available
2019-04-23 12:32:59 +02:00
JC Brand
624cf4f435
Allow nickname
to be provided by the credentials_url
2019-04-23 12:06:40 +02:00
JC Brand
cf75946e7b
Make fetchLoginCredentials a function
2019-04-23 10:50:48 +02:00
JC Brand
e9e17cb293
Fixes #1543
2019-04-23 10:47:17 +02:00
JC Brand
5ead9796cc
Set the JID in the session
2019-04-22 14:44:40 +02:00
JC Brand
25a0a898f2
Don't restore a BOSH session without knowing the JID
2019-04-22 14:33:49 +02:00
JC Brand
f8fcdc7eb8
Explicitly log out after each test.
2019-04-22 14:04:21 +02:00
JC Brand
cf32119c53
Make browserStorage key more readable
2019-04-19 11:18:34 +02:00
JC Brand
0288ef437e
Fixes #1542
2019-04-19 10:55:06 +02:00
JC Brand
1251f395b1
Use webpack to generate css/converse.css
2019-04-18 17:50:05 +02:00
JC Brand
e1392895b0
Fix: when closing a modal the overlay doesn't get removed
...
Looks like the `webkitTransitionEnd` event doesn't fire because `fade`
is already on the modal, so there's no transition, which means that in
bootstrap.native the event doesn't get fired to remove the overlay.
2019-04-18 16:14:51 +02:00
JC Brand
8bc3aaa224
Upgrade to Webpack 4.28.1
2019-04-18 16:14:51 +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
d2166ce3dd
Remove deprecated API methods
...
since the next release will be a major one.
2019-04-16 16:57:55 +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
3c988240d1
Don't check for debug mode too early
...
Otherwise we can't enable it during operation
2019-04-16 13:59:04 +02:00
JC Brand
4eb6df92c6
Bugfix. Controlbox closed state not remembered
...
in overlay view mode.
Also refactored a bit to put the method, which determines whether a
chatbox may be shown, on the chatbox itself.
2019-04-16 13:38:46 +02:00
JC Brand
1dd2c4ce7b
Reconnect if we can't send a message due to dropped connection
2019-04-16 13:01:47 +02:00
JC Brand
1328168d1e
Fixes #1532 Converse reloads on enter pressed in the filter box
2019-04-11 23:44:16 +02:00
JC Brand
06f53e7f18
Add some padding to form error message
2019-04-11 23:42:19 +02:00
JC Brand
b593b8deb6
Fixes #1533
...
Users can only be muted in moderated rooms
2019-04-11 23:10:57 +02:00
JC Brand
76a7c3fa9b
Bugfix. Update to new function which has been renamed.
2019-04-11 20:08:53 +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
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
36761f290e
Don't show checkmark for /me messages
2019-04-10 19:34:31 +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
87337eaeef
Bugfix. Modal auto-closes when you open it a second time
2019-04-08 21:45:09 +02:00
JC Brand
5532a9ec63
Remove jquery from tests
2019-04-08 21:45:09 +02:00
JC Brand
487114568a
OAuth is not a core plugin
2019-04-05 14:04:50 +02:00
JC Brand
eb67f10371
Handle case where there isn't a MUC close button
2019-04-05 14:04: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
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
b8107afa0e
Bugfix. Remove highlight from roster item when chatbox is closed.
2019-03-31 13:05:51 +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
337e267594
Don't trigger OMEMOInitialized
if something went wrong.
2019-03-31 12:01:19 +02:00
JC Brand
dd0c0b6c56
Add a new active
flag for OMEMO devices.
...
Instead of deleting devices that are not returned in the device list,
set an `active` flag, so that we don't remove the trust setting.
Set deactivated devices to `active` when a receive an OMEMO message from
it.
Also, set omemo_supported to true when we've succesfully decrypted a
message.
2019-03-31 11:33:31 +02:00
JC Brand
c32ecb7e82
Refactor fetchDevices
to make it smaller and simpler to read
2019-03-30 17:01:50 +01:00
JC Brand
1b08df89bb
Don't send OMEMO message when we don't have any devices for contact
2019-03-30 16:32:47 +01:00
JC Brand
1a2e7b235a
OMEMO bugfix. Store prekey as boolean and handle '1' and 'true'
2019-03-30 15:57:36 +01:00
JC Brand
1dfdb36d20
Don't filter out own device when sending OMEMO message
2019-03-30 13:55:25 +01: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
7481643453
Validation error when trying to add an already existing contact
2019-03-28 15:54:47 +01:00
JC Brand
be1abdb5ff
Add classes for easy styling
2019-03-28 15:43:29 +01:00
Christoph Scholz
dde815e0a8
Allow manual entry of jid with xhr_user_search_url
2019-03-28 15:38:56 +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
34b8cd2ee6
Prevent user from adding themselves as contact
2019-03-28 15:36:08 +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
b726a2353c
Remove Awesomeplete in favor of _converse.AutoComplete
2019-03-28 12:43:34 +01:00
JC Brand
8d385487c9
Remove unused element attributes
2019-03-28 12:35:19 +01:00
JC Brand
75ae76ad93
Use _converse.AutoComplete
in "Add Contact" modal
2019-03-28 10:47:14 +01:00
JC Brand
616731b323
Don't show MUC domain if locked_muc_domain
is set to 'hidden'
2019-03-27 13:13:07 +01:00
JC Brand
03f9eb95da
Fixes #1467 . Fix rendering of URLs enclosed with sharp brackets
...
such as <https://example.org >
2019-03-27 11:24:55 +01:00
JC Brand
18ad34e194
Show emoji shortname in tooltip
2019-03-27 08:41:32 +01:00
JC Brand
6cbdaa0f4f
Bugfix. Bookmarks list didn't remember toggle state
...
We need to wait for the state to be fetched from storage before
rendering the list.
2019-03-27 08:34:58 +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
3ce3d661bc
Make sure required registration fields have "required" attribute
2019-03-26 14:52:26 +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
JC Brand
a9ce9acff2
Make sure nickname
config option takes precedence
...
above other nickname sources.
2019-03-26 11:31:11 +01:00
Guus der Kinderen
bde1b9529b
Minimized bookmarked chatboxes should not be always maximized after page reload
...
This is a fix for https://github.com/conversejs/converse.js/issues/1508
2019-03-26 11:06:32 +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
fa85fc71b9
Use async/await
2019-03-22 15:49:44 +01: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
Christoph Scholz
0957b7086f
Don't prompt for reason if auto_join_on_invite
2019-03-19 22:26:42 +02: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
Meitar M
76bff83ca3
Allow http:
image URLs if Converse.js is loaded on an insecure origin.
...
Currently, in order for Converse.js to recognize a pasted URL as an
image, it must be an URL whose protocol is `https:` (`https` in the
URI.js library's notation). This is sensible, but means that any
non-HTTPS image URL is not recognized as a valid URL (and thus will not
be rendered inline, even if `show_images_inline` is set to `true`).
It is important to always check for HTTPS URLs when in a secure context
(i.e., the initial page load was requested via HTTPS) in order to ensure
that non-secured content does not mix with secured content. However, the
inverse is not true: if the original page was loaded over HTTP, then
enforcing HTTPS for images adds arguably no meaningful protection while
also breaking the `show_images_inline` feature for the edge cases where
Converse.js is deployed without HTTPS and a user pastes an HTTP URL.
This patch changes the behavior of the `isImageURL` method such that the
requirement for the pasted URL's protocol to be `https:` is enforced
only when the `window.location.protocol` itself is also `https:`. By
doing this, we ensure that secure origins (i.e., when Converse.js is
loaded over HTTPS initially) are still secured and cannot have non-HTTPS
content introduced to the page via a pasted non-HTTPS URL, however it
also allows non-HTTPS origins to render both HTTP and HTTPS image URLs.
2019-03-09 14:15:22 +02:00
Christoph Scholz
ed9d2a2526
make it configurable whether to respect autojoin
2019-03-09 14:10:40 +02:00
JC Brand
143d44c3f6
Avoid horizontal scrolling on the fullscreen login page
2019-03-07 17:47:30 +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
Holger Weiss
a15aec3519
Assume "text-single" as default form field type
...
As per XEP-0004, the default "type" of data form fields is
"text-single", so a missing "type" attribute should not be treated
differently.
This fixes handling of CAPTCHAs offered by ejabberd.
2019-03-06 15:08:41 +01:00
Christoph Scholz
37800d92d3
allow drag & drop also in MUCs
2019-03-05 18:21:07 +01:00
JC Brand
0ebfc3fce8
Let converse-autocomplete also be triggered with backspace
2019-03-05 17:59:22 +01:00
JC Brand
7910447cf6
Use ev.key
instead of ev.keyCode
...
Removes the need for maintaining a map of keycodes to keys
2019-03-05 17:59:22 +01:00
JC Brand
f8e31a7b49
Update converse-autocomplete to make it more flexible
...
* Accepts other triggers besides tab or @
* More finegrained control over whether the triggering char is
included in the returned value or not.
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
310b2c723b
Fixes #1149
...
With xhr_user_search_url, contact requests are not being sent out
2019-03-01 11:56:22 +01:00
JC Brand
d4fbdf5629
Fixes #1213 . Switch roster filter input and icons
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
61a0e1bb16
New config setting show_client_info
...
Determines whether we show the icon for opening the client's "About" modal.
2019-02-27 14:42:27 +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
519bd54acb
Fixes #1457 . Wrong tooltip shown for "unbookmark" icon
2019-02-26 12:08:48 +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
2ddd918f6a
Fixes #1437 . List of groupchats doesn't scroll
2019-02-26 11:57:36 +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
0ee08ee622
Use async/await for enterRoom
2019-02-22 23:14:35 +01:00
JC Brand
9b0e23dcc6
Ensure new contact is attached to existing chatbox
...
When a new contact is added, check if we already have a chatbox open for it,
and if so attach it to the chatbox.
2019-02-22 23:05:03 +01:00
JC Brand
bfaa7e47f2
Add roomviews.get API method
2019-02-22 21:44:03 +01:00
JC Brand
0fc5112000
Found one more occurance of the word room
2019-02-22 21:44:03 +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
JC Brand
ce2ae87df2
Bugfix. Open groupchats not shown when logging in after disconnection
...
* Replace `tearDown` overrides with event handlers.
* Move presence listeners to `connected` event handler, otherwise they
don't get called when logging in again after disconnection.
* Add `clearSession` listeners to clean up upon disconnection.
* Use `Promise.all` instead of listening for multiple events.
2019-02-20 23:08:27 +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
4463b44773
Use "XMPP address" instead of "XMPP username"
2019-02-19 15:00:38 +01:00
JC Brand
e389d77107
New release 4.1.1
2019-02-18 20:40:55 +01:00
André Berenguel
8dcb327ead
Update contact nickname when receive a roster push
2019-02-18 20:23:20 +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
JC Brand
af0093bd39
Bugfix: MUC invite form not shown
2019-02-18 15:42:56 +01:00
JC Brand
d830bc1250
Also check for duplicates in one-on-one messages
2019-02-14 15:17:49 +01:00
JC Brand
d08f738656
Bugfix: Restore textarea size after sending message
2019-02-14 13:21:26 +01:00
JC Brand
7e34a462c1
Add support for handling multiple stanza-id
elements
2019-02-14 12:13:07 +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
6eb05be4be
XEP-0359: Better usage of stanza-id
to check for dupes
2019-02-13 22:14:58 +01:00
JC Brand
5b25d5daaa
Don't send markers to someone not on your roster
...
Updates #324
2019-02-13 19:32:02 +01:00
JC Brand
370c4c84d9
Use async/await instead of explicit promises
2019-02-13 15:49:51 +01:00
JC Brand
4c83a23382
Revert "Reject the waitUntilFeaturesDiscovered
promise if query failed"
...
This reverts commit 01f0a65209
.
Updates #1410
2019-02-13 15:44:17 +01:00
JC Brand
2c9c11e971
onMessage
improvements.
...
Don't check for older messages with same msgid
we can't rely on a message's `id` attribute being unique.
Also, remove `createMessage` in favour of calling `messages.create` directly.
2019-02-13 15:24:02 +01:00
JC Brand
0169d86b11
Re-add check for allow_non_roster_messaging
2019-02-13 15:21:41 +01:00
JC Brand
dfe9d301c6
Test that roster groups are fetched before contacts
...
updates #1405
2019-02-13 11:20:49 +01:00
laszlovl
b172861d2c
Dont run fetchRosterContacts async, to prevent processing presence before contacts are created
...
Fixes #1405
2019-02-13 09:13:45 +01:00
JC Brand
4a5603ab2e
More specific selector for markers and another test
...
Updates #1442
2019-02-13 08:58:27 +01:00
JC Brand
dbcf6002ff
Fixes #1442
2019-02-12 19:10:46 +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
7100681496
Use devDependencies consistently
...
'dependencies' in package.json get installed as well when installing
converse.js or @converse/headless in a 3rd party project, which is
unnecessary.
2019-02-11 19:34:21 +01:00
JC Brand
aa64df35ee
converse-core is not a plugin
2019-02-11 14:45:16 +01:00
Johan Oudinet
a7386200f7
Makefile: Simplify sed commands
...
And fix an extra space added by mistake by the sed command on
_converse.VERSION_NAME in converse-core.js.
2019-02-11 04:45:35 -07:00
JC Brand
a1a381428c
Add converse-chatboxviews as dependency
2019-02-08 15:37:47 -07:00
JC Brand
abe21dce66
Include origin-id
in outgoing messages
2019-02-08 15:34:16 -07:00
laszlovl
590d8769a9
Prevent duplicate messages on MUC join
...
Fixes #1414
2019-02-08 15:32:21 -07:00
JC Brand
004519931c
Upgrade babel and lodash
2019-02-05 13:02:36 -07:00
Christoph Scholz
5e1f5785f9
fix moderator commands that change affiliation
2019-02-05 12:47:53 -07:00
JC Brand
e1f8d53c46
Initial support for chat markers. Updates #324
2019-02-01 15:05:13 +01:00
JC Brand
4c964c56c0
Filter out undefined
2019-02-01 15:05:13 +01:00
JC Brand
1ca7d34c25
Ignore (and destroy) archived/delayed messages with no body to show
2019-01-31 16:11:17 +01:00
Christoph Scholz
b667eae1c8
muc moderator commands can be disabled selectively
2019-01-30 03:42:12 +01:00
JC Brand
10f629310e
Need to declare muc_show_join_leave
as setting
2019-01-29 05:50:43 +01:00
Holger Weiss
af091faf33
Resurrect muc_show_join_leave option
...
The option got lost in commit 9528d81c00
.
Fixes #1263
2019-01-29 05:45:35 +01:00
JC Brand
4150a3a70b
Add Esperanto as supported language
2019-01-29 05:40:34 +01:00
JC Brand
3cbc99a3f2
Roster fixes related to reconnecting
...
Avoid `An 'url' property must be specified` error by properly clearing
presence data upon teardown and then resetting the browserStorage upon
reconnection.
Store contact resources in a Backbone collection
2019-01-28 13:30:47 +01:00
JC Brand
4e9e532a06
Use async/await in populateRoster
2019-01-28 13:27:25 +01:00
JC Brand
374260242c
Variable interpolation bugfix
2019-01-28 13:27:25 +01:00
JC Brand
d97deaea80
Fixes #1369
...
* Add test and changelog entry
* Also show message subject if available
2019-01-28 13:27:25 +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
7753177ca9
Remove unnecessary aliases from webpack
2019-01-25 07:32:50 +01:00
Emmanuel Gil Peyrot
9702e9dee3
Add ARIA live region on chat-content
...
This asks screen readers to read every message received, and is
mandatory for blind users to get notified of new messages.
2019-01-23 14:01:27 +01:00
Christoph Scholz
9eee13e192
fix direct invite for membersonly room
2019-01-22 10:41:59 +01:00
Christoph Scholz
84be0fb9f7
new config option "roomconfig_whitelist"
2019-01-12 21:51:47 +01:00
JC Brand
a2f42d27a2
New release 4.1.0
2019-01-11 18:49:37 +01:00
JC Brand
79990f7e01
Don't unnecessarily set height on textarea
2019-01-11 18:38:09 +01:00
JC Brand
4fe2b23d9c
Modernize some roster tests
...
By ditching jquery and using async/await
2019-01-11 17:40:52 +01:00
Lynesth
df7d663b1d
Force avatar refetch if new hash received
...
Fixes #1334
2019-01-11 17:39:49 +01:00
Lynesth
7e370c1b81
Fix send_chat_state_notifications option for MUCs
...
Fixes half of #1337 .
2019-01-11 17:32:23 +01:00
JC Brand
dc07440de8
Bugfix. Don't create chats for messages without body
2019-01-10 21:47:50 +01:00
JC Brand
1984bdd8e1
Remove row
class.
...
Causes the register form to overflow the parent bounds in overlay view
2019-01-10 21:17:05 +01:00
JC Brand
1eb00d3e5d
CSS/HTML: Nicer styling of branding on the login page
2019-01-10 21:15:01 +01:00
JC Brand
58c29ea26b
Bugfix. Make sure to refresh
...
Otherwise we get an empty collection of features (due to features being
queried for a non-existent MUC)
2019-01-10 13:22:15 +01:00
JC Brand
01f0a65209
Reject the waitUntilFeaturesDiscovered
promise if query failed
...
No code relies on this currently, but it's seems the right thing to do
2019-01-10 13:21:06 +01:00
JC Brand
96f38150f9
Use async/await and don't swallow errors.
...
Also, handle the error in `getRoomFeatures`
2019-01-10 13:16:08 +01:00
JC Brand
a4d608dcdf
Save room features in separate model
...
As a namespacing mechanism to avoid clashes.
Fixes bug where two chats are shown as currently being active in the rooms list.
2019-01-10 12:15:59 +01:00
JC Brand
2fb435b2e0
Don't assume id of "current" for bookmarks' PEP node
...
Causes problems with some versions of Ejabberd which use a different id.
Will be fixed in upcoming versions.
2019-01-08 15:12:02 +01:00
JC Brand
8c708b5fe5
Focus textarea when switching between rooms
2019-01-04 05:48:23 +01:00
JC Brand
d92a742877
Fixes #1390
2019-01-04 05:43:59 +01:00
JC Brand
0c1363c103
The hide_muc_server
option no longer exists
2019-01-03 14:12:36 +01:00
JC Brand
a962fc0a24
Don't unnecessarily check for #publish-options
2019-01-03 13:49:39 +01:00
Christoph Scholz
eacd7fd933
implement /destroy command in muc
2019-01-03 13:09:13 +01:00
JC Brand
7d74319efd
Fixes #1356
2019-01-03 11:45:52 +01:00
JC Brand
aa274f41c2
Make background darker and add new logo
2019-01-02 22:54:04 +01:00
JC Brand
debb8f0e4f
Remove .icon-converse styles
2019-01-01 12:30:54 +01:00
JC Brand
a31c2d40f2
Remove icomoon fonts and use Bauman and the new logo for branding
2019-01-01 11:12:23 +01:00
JC Brand
98fee37a41
Destroy devicelist if we can't fetch the devices for it.
...
Otherwise Converse will try to fetch the devices again and again upon
page refresh.
2018-12-21 06:29:22 +01:00
JC Brand
45ed506551
Don't hardcode devices storage to session storage.
...
The devicelists are not stored in session storage, so we end up with
fetching all the devices per stored devicelist with every new browser
session.
2018-12-21 06:29:22 +01:00
JC Brand
e6c66cfebd
Ability to republish if publish-options precondition not met
2018-12-21 06:29:22 +01:00
JC Brand
bcb3bcaf03
OMEMO can only be supported once it's been initialized
...
updates #1180
2018-12-21 06:29:21 +01:00
JC Brand
a3830e9a7a
Use async/await
2018-12-21 06:29:21 +01:00
JC Brand
be1be3534c
Don't render the lock icon when the MUC doesn't qualify
...
Updates #1180
2018-12-21 06:29:21 +01:00
JC Brand
9aca32ad97
Handle errors when sending encrypted groupchat messages
...
updates #1180
2018-12-21 06:29:21 +01:00
JC Brand
d051085626
Only clear textarea once message was sent
...
This now requires `sendMessage` to return a boolean to indicate success.
Disable the textarea while message is being sent.
2018-12-21 05:58:22 +01:00
JC Brand
85dab7367b
Use pubsub#access_model
to publish keys and devices publically
2018-12-21 04:35:28 +01:00
JC Brand
0b25800392
Add converse-pubsub.js
2018-12-20 21:51:16 +01:00
JC Brand
9c05ca9a09
Add test for sending/receiving MUC OMEMO messages
...
While adding support for MUCs, I refactored converse-omemo somewhat to move functions
out of `overrides` and to use async/await
Updates #1180
2018-12-20 21:51:16 +01:00
JC Brand
f64fdb8088
Render the OMEMO lock icon in MUC toolbars as well
...
updates #1180
2018-12-20 21:51:16 +01:00
JC Brand
c8d78d744b
Fix typo and formatting in user-facing strings
2018-12-19 05:50:06 +01:00
JC Brand
4a65e39804
Set default to avoid includes
being called on undefined
2018-12-17 15:29:21 +01:00
Christoph Scholz
d2d64952a0
set store hint on receipts and type='chat'
2018-12-17 15:20:21 +01:00
JC Brand
38d7723bee
Don't call trimChats when not in overlayed mode
2018-12-17 15:18:36 +01:00
JC Brand
82bfe66cac
Simplify setting of MUC features.
...
We don't need an event handler that sets the "opposite" features to
false if we set all features properly in getFeatures
2018-12-17 15:18:20 +01:00
JC Brand
94bcba741b
Handle non-elements, like text nodes
2018-12-17 15:17:53 +01:00
JC Brand
9c812157ee
Use async/await
2018-12-17 15:16:43 +01:00
JC Brand
aed1c60e86
Still trying to fix travis issue.
...
Stop listening on the _converse obj sooner
2018-12-17 12:09:56 +01:00
JC Brand
6c3990ac86
Trying to fix trimChats is not a function
on Travis
2018-12-17 11:50:56 +01:00
JC Brand
49efe390f9
Fix typo
2018-12-17 11:42:43 +01:00
JC Brand
d5e89655dc
Still check the view mode since the trimChats method is debounced
2018-12-16 11:32:19 +01:00
JC Brand
a389f52adb
Fixes #1353 Don't expect delivery receipts to have type chat
2018-12-16 11:22:13 +01:00
JC Brand
b7c01993b7
User-facing term is "groupchat", not "room"
2018-12-16 11:22:12 +01:00
Christoph Scholz
216a684904
prevent message delivery receipts for carbons and own
2018-12-15 20:04:31 +01:00
JC Brand
6ec183451d
Remove global event listener when appropriate.
...
Otherwise trimChats called in `fullscreen` tests (due to being
registered in a previous test)
2018-12-15 20:01:19 +01:00
JC Brand
9ff505fd66
Add unregisterGlobalEventHandlers method
...
And call it when `converse.initialize` gets called again
2018-12-15 20:00:36 +01:00
JC Brand
003af0c438
visibilitychange
is supported by all browsers we support
...
So simplify the code that saves the window state
2018-12-15 19:59:30 +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
d5485d09ae
Always render the OMEMO lock icon
...
When OMEMO isn't possible, render it as grey.
This change makes OMEMO for MUCs easier, since there I anticipate that
OMEMO support might change dynamically based on who enters/exits the
room.
updates #1180
2018-12-14 11:25:57 +01:00
JC Brand
9b61b2bdab
We do need a validate method, but it needed a fix.
2018-12-13 10:07:31 +01:00
JC Brand
c954610903
No need to call validate
here
...
Since the plugin is not enabled when it matters.
updates #1374
2018-12-13 08:57:58 +01:00
JC Brand
5dacb96b78
Don't try to create ChatBox from controlbox data in embedded mode
...
updates #1374
2018-12-12 18:52:41 +01:00
JC Brand
e38daf34f7
Remove coupling between converse-chatboxes and converse-roster
...
In embedded mode (singleton) we don't need or want the roster, so we
should be able to disable it.
updates #1374
2018-12-12 18:52:40 +01:00
JC Brand
df3118fe81
Fix bookmark icon
2018-12-12 17:40:14 +01:00
JC Brand
ccb8662ef7
Bugfix. First match for MUC commands
2018-12-10 15:40:30 +01:00
JC Brand
1d55b131f6
CSS: set groupchat owner badge to groupchat color
2018-12-10 15:12:29 +01:00
JC Brand
262b9f9260
CSS: Give color to the controlbox headings
2018-12-10 15:12:28 +01:00
JC Brand
4c965b58d3
CSS: Reuse list-item-action
class for "Contact Requests" actions
2018-12-10 15:12:27 +01:00
JC Brand
2a79c5b08a
Consistent icon usage for leaving a room
2018-12-10 13:31:42 +01:00
JC Brand
02c907128c
Fix regex for setting the version number.
...
updates #1366
2018-12-07 13:55:41 +01:00
JC Brand
384f1d7977
New release 4.0.6
2018-12-07 12:40:02 +01:00
JC Brand
90bf42a002
HTML and CSS improvements for listed items in the controlbox
...
Fixes #1348
Tried to get the unread messages indicator to line up properly with the
text and icons in a room list item.
Also tried to reuse styles where appropriate, specifically
`.list-container` and `.list-toggle`.
2018-12-07 11:37:51 +01:00
JC Brand
aa730b5976
New event messageNotification
2018-12-06 13:55:28 +01:00
JC Brand
a2441545db
Add check inside method, like with playSoundNotification
2018-12-06 13:52:32 +01:00
JC Brand
2857293ad1
Fix failing tests by waiting and slightly improve code
2018-12-06 13:10:34 +01:00
JC Brand
5f00987578
Bugfix. Pass original_stanza to isDuplicate
2018-12-06 13:10:33 +01:00
JC Brand
79bfb45639
Use async/await in MAM code and tests
2018-12-06 13:10:33 +01:00
JC Brand
118bc20478
Rename isSingleton
to isUniView
...
We distinguish between UniView and MultiView instances.
UniView means that only one chat is visible, even though there might be multiple ongoing chats.
MultiView means that multiple chats may be visible simultaneously.
2018-12-04 13:50:15 +01:00
JC Brand
dd3133e7de
Avoid RID out of range
errors in Prosody
...
by not flushing stanzas when sending out an <inactive> CSI.
When reloading the page, the stanzas are resent (because we never had
time to receive acks) which causes problems on Prosody (and likely also
causes the Ejabberd "other-request" errors).
2018-12-03 21:33:34 +01:00
JC Brand
f051ff283b
Don't store vcards globally to all accounts.
2018-11-30 19:43:40 +01:00
JC Brand
714da6f0df
Wait until push services are disabled as well
2018-11-29 13:22:58 +01:00
JC Brand
7109ff672e
Add api method to retrieve controlbox
2018-11-29 12:37:21 +01:00
JC Brand
6358fd7c97
Use finally
2018-11-29 10:41:46 +01:00
JC Brand
cd63afcaad
Add space following question mark
2018-11-22 09:09:14 +01:00
Christoph Scholz
267d91a4f3
don't send receipt requests in MUCs
2018-11-20 17:38:59 +01:00
JC Brand
d341c6a13b
Revert "Use getter to lazily create Strophe.Connection"
...
This reverts commit 7af73c3471
.
Doesn't look like the right approach for adding support for XEP-0156.
Work on that will continue in a branch in the meantime.
2018-11-20 17:31:53 +01:00
JC Brand
7af73c3471
Use getter to lazily create Strophe.Connection
2018-11-18 18:05:47 +01:00
JC Brand
86593dc378
Don't render http (i.e. non-TLS) resources
...
Causes "Mixed Content" TLS errors
2018-11-18 18:05:47 +01:00
JC Brand
c46d937ea4
Fix null check
2018-11-18 15:16:40 +01:00
JC Brand
67958bba40
Check xmlns
2018-11-17 18:58:23 +01:00
Christoph Scholz
8524ff3b99
Fix missing checkmarks in old muc messages
2018-11-17 18:52:52 +01:00
Emmanuel Gil Peyrot
223deaa782
Log the actual error on MAM error
2018-11-17 18:39:28 +01:00
JC Brand
d3a684a57d
Move some functions outside of the initialize
closure
2018-11-15 23:10:40 +01:00
JC Brand
588b015e62
Release v4.0.5
2018-11-15 13:24:22 +01:00
JC Brand
5109c845ef
Add language support for Galician
2018-11-15 12:25:31 +01:00
JC Brand
35a1693ade
Use es2015 module imports in i18n.js
2018-11-15 11:51:43 +01:00
JC Brand
01c3d35db2
Remove unnecessary webpack aliases
2018-11-15 11:29:28 +01:00
JC Brand
82a97fdcb0
Add padding to receipt checkmark
2018-11-15 10:50:25 +01:00
JC Brand
7e24019568
Fixes #1288
...
Add CSS classes to differentiate between incoming and outgoing messages
2018-11-15 10:30:58 +01:00
JC Brand
ecff1fd954
Don't show role badges for /me messages
2018-11-15 10:25:12 +01:00
Emmanuel Gil Peyrot
339d8a8f92
Add XHTML compatibility
...
This is mainly a testing tool, which makes a mode where all HTML bugs
which could slightly mess up the rendering will trigger proper errors in
the browser.
Fixes #1131 .
2018-11-14 22:08:12 +01:00
Emmanuel Gil Peyrot
ab5dd4a146
Switch avatar rendering from canvas to SVG.
...
This delegates the calculation of the aspect ratio to the browser, and
generally simplifies the code.
Fixes #1156 .
2018-11-14 16:03:37 +01:00
JC Brand
352c0797ad
Rename theme to concord
and add config option for setting the theme
2018-11-14 15:56:28 +01:00
JC Brand
dde2efb653
Fix trash icons for pending contacts
2018-11-14 15:46:51 +01:00
JC Brand
067d87a73e
Fix failing test
2018-11-14 15:15:29 +01:00
JC Brand
7cb889b065
Fixes #1317 Don't show errors for CSI messages
2018-11-14 14:34:23 +01:00
JC Brand
1e7247b4d2
Add client info modal showing name and version number
2018-11-14 12:01:27 +01:00
Christoph Scholz
9a307da808
show version info in login dialog
2018-11-13 21:12:24 +01:00
JC Brand
45c47ab2c0
Merge branch 'master' into implement_last_user_interaction_in_presence
2018-11-13 18:45:47 +01:00
Christoph Scholz
12b7687a89
Implement sending presences according to XEP-0319: Last User Interaction in Presence
2018-11-13 18:39:13 +01:00
Christoph Scholz
4b7d18f418
added values 'on' and 'off' for 'trusted' option
2018-11-13 18:36:24 +01:00
Christoph Scholz
da5ca0b585
implement XEP-0184: Message Delivery Receipts
2018-11-13 17:13:35 +01:00
JC Brand
10415c252d
Remove duplicate import and make new build
2018-11-13 13:15:54 +01:00
JC Brand
b85c5b5b0e
Remove backbone.noconflict wrapper
2018-11-12 21:05:30 +01:00
JC Brand
3f751b3af4
Add guard for non-existing chat_state
value
2018-11-12 20:59:43 +01:00
JC Brand
c494f4267a
Use constant
2018-11-12 20:52:28 +01:00
JC Brand
75b923b580
Bump MAM timeout to 20 secs
2018-11-12 20:29:55 +01:00
JC Brand
3b60ced39c
Add a button for regenerating your OMEMO device bundle
2018-11-12 20:29:55 +01:00
JC Brand
fa4c555c44
Use async/await instead of explicit Promise
2018-11-12 14:45:57 +01:00
JC Brand
773c678c4d
More button color fixes after switching to css properties
2018-11-12 14:06:52 +01:00
JC Brand
6139b8060d
Consistent placing of modal buttons
2018-11-12 14:05:35 +01:00
JC Brand
affafc746c
Bugfix. Make sure _devices_promise
is a Promise
2018-11-12 12:04:25 +01:00
JC Brand
9d0cfe8f43
Presence subscription bugfixes.
...
* Return the promise, so that we can wait.
* `sendContactAddIQ` now returns a promise and doesn't take a callback
* Don't call `destroy` on a contact that's already been removed.
2018-11-10 19:09:51 +01:00
JC Brand
461ebc0aea
Use async/await instead of explicit promises
2018-11-09 17:37:14 +01:00
JC Brand
d9093c09ee
Fixes #1312
2018-11-07 12:11:22 +01:00
JC Brand
476b8041aa
Fix badge & button colors. Ensure vars apply to .converse_content
2018-11-07 11:40:35 +01:00
JC Brand
2179255d0a
Add button for resyncing roster contacts
2018-11-07 11:12:04 +01:00
JC Brand
5e7d5d7fb1
Add own class and style for controlbox heading buttons
2018-11-07 11:11:20 +01:00
Christoph Scholz
8ba8a4bc01
new value 'all' for 'show_desktop_notifications'
2018-11-06 10:31:02 +01:00
Christoph Scholz
1bdb171698
added option notification_delay
2018-11-06 06:46:40 +01:00
JC Brand
cc3735ff08
Use async/await
2018-11-05 21:12:12 +01:00
Emmanuel Gil Peyrot
87c77385d8
Improve XEP-0245 support.
...
Namely:
- Only match messages which start with exactly "/me ".
- Simplify the match, checking a string instead of a complex regex.
- Always remove the first four characters in the case of a match, to not
leave an extra leading space.
2018-11-05 14:02:14 +01:00
Emmanuel Gil Peyrot
9a12afc702
Change a docstring into a comment.
2018-11-03 12:05:23 +01:00
Emmanuel Gil Peyrot
5cd7ccb3ef
Correctly display error when HTTP File Upload isn’t supported by the server.
2018-11-03 00:55:18 +01:00
Emmanuel Gil Peyrot
0d4603d80d
Upload files on drag-and-drop.
...
Fixes #1188 .
2018-11-03 00:55:18 +01:00
Emmanuel Gil Peyrot
8c5df984f4
Make user JID a link in user details.
2018-11-03 00:32:29 +01:00
Emmanuel Gil Peyrot
6e26f8b50a
Put the colons in the translatable message.
...
This helps languages which use a different typography for the colon,
such as French which has a narrow non-breakable space before it, or
Japanese which uses a full-width colon character.
2018-11-03 00:25:07 +01:00
Christoph Scholz
171e257c22
make default paths in notifications relative
2018-11-03 00:23:59 +01:00
JC Brand
609995c767
updates #1294 Pass i18n function to template
2018-11-03 00:15:23 +01:00
Emmanuel Gil Peyrot
73e2d44d22
Allow translation of “Uploading file:”.
2018-11-03 00:15:23 +01:00
JC Brand
f974c79acf
Bugfix. Declare converse-modal as a dependency of converse-message-view
...
Otherwise we get `TypeError: Cannot read property 'extend' of undefined`
when attempting to extend `BootstrapModal`.
2018-11-02 11:59:56 +01:00
JC Brand
f471dd2474
Release 4.0.4
2018-10-29 22:28:28 +01:00
JC Brand
6bab16d834
New patreon backers
2018-10-29 11:44:25 +01:00
Emmanuel Gil Peyrot
8c61922d7f
Replace the default avatar with a SVG version.
...
This is both lighter, looks better when rendered at arbitrary
resolutions (as there is no scaling being done), and actually editable
for different deployments.
This image has been hand-drawn using the PNG as a background.
2018-10-28 23:51:00 +01:00
JC Brand
2cfea7cb51
Add description for translateable text
2018-10-28 23:24:33 +01:00
JC Brand
11a53608d9
Right Align badges of room occupants
...
fixes #1264
Also...
- hide the badges in overlayed view mode
- hide the features list in overlayed view mode
2018-10-28 23:20:29 +01:00
JC Brand
fd41994672
Pin to latest backbone.browserStorage, then make clean && make dist
2018-10-28 18:23:05 +01:00
JC Brand
6a87caad6e
Don't use template literals for translated strings
2018-10-27 23:12:17 +02:00
JC Brand
11ac846b31
Fixes #1259
2018-10-27 22:56:05 +02:00
JC Brand
f0c5f69757
Fix unclarity in tooltip
2018-10-27 19:23:35 +02:00
JC Brand
36f63d9000
Fixes #1272 Hiding MUC occupants leaves a blank space
2018-10-26 16:37:56 +02:00
JC Brand
20098c08fd
Restrict whitelist for headless only to the relevant plugins
2018-10-26 16:09:45 +02:00
JC Brand
0a02b62cd8
Update build docs on converse-headless and add README
2018-10-26 16:07:37 +02:00
JC Brand
6a70f8abb4
Updated build
2018-10-26 14:45:36 +02:00
JC Brand
2f9089ee10
Updates #1261 More file upload fixes
2018-10-26 14:45:36 +02:00
JC Brand
98b27fbe0c
Merge pull request #1271 from Ppjet6/issue-1252-bookmark-title
...
Fix #1252 , incorrect bookmark icon title
2018-10-26 13:13:06 +02:00
JC Brand
6519083414
Revert to explicit Promise-based code.
...
* src/converse-controlbox.js
async/await causes many tests here to fail due to the controlbox toggle
now apparently showing up a little later (and the tests don't wait for
it to happen).
* src/converse-minimize.js
We get timeout issues in tests.
* src/headless/converse-chatboxes.js
We get a stack overflow while running tests.
2018-10-26 12:53:01 +02:00
JC Brand
7a1f62d34a
Move isVisible
from core utils to html utils
2018-10-26 10:15:36 +02:00
Maxime “pep” Buquet
6f457333ba
Fix #1252 , incorrect bookmark icon title
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-10-25 22:29:20 +01:00