JC Brand
1d38d8af03
Use twemoji for rendering emojis
2018-09-03 13:24:37 +02:00
JC Brand
866f2737da
More JSDoc docstrings for API methods
2018-09-02 23:43:39 +02:00
JC Brand
33c2d4614f
Remove unused method
2018-08-29 10:33:43 +02:00
JC Brand
f72ace506f
Replace the onChatBoxAdded override with event handlers
2018-08-28 15:08:38 +02:00
JC Brand
1dc1c1f98a
Properly generate and render fingerprints
2018-08-27 21:02:31 +02:00
JC Brand
d784e4a73a
Show an icon to indicate that a message is encrypted
...
updates #497
2018-08-24 16:26:54 +02:00
JC Brand
5e9d6c3d6a
Merge branch 'master' into converse-omemo
2018-08-23 09:45:13 +02:00
JC Brand
9f8d30dde3
Create a new store, _converse.config
to store trusted
...
The `_converse.session` store gets cleared after logout, but we want the
`trusted` flag to persist after logout.
Also update the documentation no that the `storage` config option has
been removed in favor of `trusted`.
2018-08-23 09:41:39 +02:00
JC Brand
62cecbec5f
Merge branch 'master' into converse-omemo
2018-08-22 23:41:36 +02:00
JC Brand
9ed2ad631a
Store whether this is a trusted device in _converse.session
...
So that it persists across page loads. Otherwise storage falls back to
the default, causing records to be in both local- and sessionStorage.
Additionally, update singleton models to have the 'id' available as a getter.
Otherwise multiple records gets stored in browserStorage, causing random
results being returned.
2018-08-22 23:36:54 +02:00
JC Brand
a422f07866
Bugfix. beforeTearDown
event handler not fired in tests
2018-08-22 14:33:09 +02:00
JC Brand
cda426bc82
Merge branch 'master' into converse-omemo
2018-08-20 10:34:04 +02:00
Emmanuel Gil Peyrot
958e8a98a8
Use the roster name or vCard nickname before falling back to vCard fullname or JID.
2018-08-20 08:59:01 +02:00
JC Brand
b4110dc162
Merge branch 'master' into converse-omemo
2018-08-18 10:24:55 +02:00
JC Brand
2db3db9bab
Add support for editing messages containing mentions
2018-08-16 15:17:54 +02:00
JC Brand
9a8d3b695e
Generic message which works for both single and groupchats
2018-08-16 15:17:53 +02:00
JC Brand
86fab99c54
Expand test case and improve code.
2018-08-16 15:17:53 +02:00
JC Brand
b6f4f05b9e
Add converse-autocomplete and use that in the chat textarea
2018-08-16 15:17:53 +02:00
JC Brand
45d1440684
Cancel message correction by pressing escape.
...
Also fixes #1153
2018-08-10 11:48:07 +02:00
JC Brand
c652568a03
Clear color after submitting a corrected message
2018-08-09 16:33:25 +02:00
JC Brand
d852721933
Place cursor at the end when correcting a message
2018-08-07 10:09:36 +02:00
JC Brand
08dce556f9
When correcting a message, also highlight the textarea.
2018-08-07 10:09:35 +02:00
JC Brand
4c3645c559
Merge branch 'master' into converse-omemo
2018-08-03 14:47:20 +02:00
JC Brand
b027f0f784
Fixes #1143 Disallow sending of empty messages
2018-08-01 18:48:02 +02:00
JC Brand
bcd6845756
Show fingerprints in the user details modal
...
updates #497
2018-07-25 11:33:16 +02:00
JC Brand
bf13927946
Merge branch 'master' into converse-omemo
2018-07-21 11:34:51 +02:00
JC Brand
87406f5f93
Allow messages to be edited by clicking a pencil icon
...
updates #421
2018-07-21 10:41:10 +02:00
JC Brand
6a790916d3
Only own messages should be editable.
...
Fixes #1139
2018-07-21 08:12:33 +02:00
JC Brand
acd9a18696
Update with new message markup
2018-07-21 07:34:03 +02:00
Emmanuel Gil Peyrot
422757832b
Remove order constraint in chat_status message.
2018-07-14 18:26:42 +02:00
JC Brand
b4d2007972
Allow any earlier message to be edited.
...
updates #421
2018-07-08 15:20:58 +02:00
JC Brand
84a10d77d9
Cancel message correction by pressing the down arrow
...
Also, add a class `correcting` to the message being corrected, to
provide a visual cue.
updates #421
2018-07-08 11:30:15 +02:00
JC Brand
2929647e16
Add support for correcting the last message sent
...
fixes #421
2018-07-08 00:39:28 +02:00
JC Brand
6785eff4a7
Merge branch 'master' into converse-omemo
2018-07-01 11:44:04 +02:00
Joachim Vandersmissen
878b106c7b
Allow for shift-enter to insert newlines ( #1115 )
...
* Allow for shift-enter to insert newlines
See issue #1081
* Update CHANGES.md
2018-06-19 06:41:22 +02:00
JC Brand
37b622251e
Improve and simplify unread message notifications in the roster
...
Use one event instead of two, by listening to `num_unread` on chatboxes.
2018-06-07 13:40:20 +02:00
JC Brand
78d6d493d6
Add info icon in room header and show room details in modal
2018-06-04 19:54:11 +02:00
JC Brand
f7c3351e2b
Merge branch 'master' into webpack
2018-06-04 13:46:27 +02:00
JC Brand
bc872ee2cb
Fix various failing tests and update Makefile
2018-06-04 11:20:34 +02:00
JC Brand
74eed32e82
Add shims to webpack config and fix bugs in templates
2018-06-02 17:18:42 +02:00
JC Brand
8948be1d3d
In mobile view, add arrows to chat headings
...
so that you can navigate "back" to the controlbox.
2018-06-01 14:57:19 +02:00
JC Brand
9c6c90a4fc
Move config settings into the relevant plugins
2018-05-31 06:38:40 +02:00
JC Brand
6dc9e8edf1
Use webpack for module bundling
2018-05-25 14:23:32 +02:00
JC Brand
09eb1731b5
Add code to generate and publish our bundle and update the test
...
updates #497
2018-05-23 12:51:01 +02:00
JC Brand
36fd859a88
Store presence info in a separate collection
...
So that we can cache roster data for longer and presence data for
shorter.
2018-05-22 21:09:43 +02:00
JC Brand
b939de03bc
Make sure that the textarea resizes back to original size
...
after sending
2018-05-19 08:22:57 +02:00
JC Brand
37ce3fb737
Add a button to refresh a contact's vcard
2018-05-15 10:11:13 +02:00
JC Brand
38499917a9
updates #194
...
Include entity capabilities hash in outgoing presences
Also, started some work on using jsdoc for rendering API documentation.
Ideally that would go into a separate commit but that would take ages to
untangle.
2018-05-11 13:35:27 +02:00
JC Brand
09db3eddb0
Add tests for contact removal via modal
2018-05-10 22:15:23 +02:00
JC Brand
21741649e4
Don't hide close button for chats
...
I find it useful to be able to close them
2018-05-10 21:29:05 +02:00
JC Brand
d16bb315aa
Add the ability to remove a contact via the details modal
2018-05-10 18:04:17 +02:00
JC Brand
65ac389625
Add a way to show a user's vcard
2018-05-10 14:10:03 +02:00
JC Brand
b3619077f9
Remove dependency on the strophe disco plugin
...
And instead implement it ourselves.
This solves a bug with that plugin whereby the connection handlers are
added to early and are therefore never fired.
Also fixed a problem whereby entity items are queried for features
before the features have been fetched.
2018-05-07 18:06:50 +02:00
JC Brand
6ac1df43e1
Render chat state notifications on the message view
...
and not via the chatbox view (fixes some failing tests also).
2018-05-04 17:26:43 +02:00
JC Brand
99915a26f4
Use vcard from the collection for rendering messages
2018-05-03 20:05:45 +02:00
JC Brand
adf34c845c
Render chatbox avatar via the vcards collection
2018-05-03 19:01:57 +02:00
JC Brand
3fe2ff234e
Fixes #1088
...
Entity items weren't being fetched from cache.
Apparently this bug only surfaced because with Ejabberd the upload
service is nested one level deeper than with Prosody.
2018-05-03 15:48:32 +02:00
JC Brand
7eb6b13f10
Don't mark /me messages are followup messages.
2018-05-02 14:55:10 +02:00
JC Brand
f9aa75b69e
Refactored message attributes and rendering.
...
- set `username` on the message object,
instead of always using `fullname` with fallback to `jid`.
- Distinguish better between `groupchat` messages and normal
messages in `getMessageAttributesFromStanza`
2018-05-01 12:30:58 +02:00
JC Brand
4bcf8e7bc3
Mark followup messags so that they can be styled differently
2018-04-30 15:37:37 +02:00
JC Brand
3d42425083
Some UI improvements
...
- Render images as thumbnails
- Use the image.html template when rendering images from pasted URLs
- Update message and spoiler markup to render avatars
- Use the default avatar as fallback when user doesn't have one
- Instead of 'me' render own name or JID
2018-04-30 15:37:36 +02:00
JC Brand
57f7e31aa1
Add a spoiler message to the mockups
2018-04-30 15:37:36 +02:00
JC Brand
6cce931086
Make sure show
is created on all chatbox types
2018-04-24 16:39:39 +02:00
JC Brand
76a47829cd
Optimize keyPressed
slightly
2018-04-24 14:35:29 +02:00
JC Brand
7807b19905
Debounce show
similarly to other methods
2018-04-24 14:34:19 +02:00
JC Brand
71be72b50c
Automatically grow/shrink input as text is entered/removed
2018-04-24 14:33:00 +02:00
JC Brand
59a72efe1b
Refactor MUC message sending
...
To make it more similar to how messages are sent in private chats and to
reuse methods as far as possible.
Removed `sendChatRoomMessage` and `clearChatRoomMessages`
2018-04-24 11:09:36 +02:00
JC Brand
a15c9e54d0
Also test for when XEP-0363 is not supported
...
Updates #161
2018-04-22 17:47:34 +02:00
JC Brand
74f9952b24
Move sendChatState
methods to the models
2018-04-22 04:25:05 +02:00
JC Brand
2850ef0485
Don't show delayed chat state notifications
2018-04-22 04:09:24 +02:00
JC Brand
133df99aec
Honor the filesize restrictions of the XMPP server
...
updates #161
2018-04-18 11:35:33 +02:00
JC Brand
c01e9f8265
Move methods from chatbox view to message view
...
Specifically the methods related to requesting an upload slot and uploading a file.
Also show a progress indicator while a file is being uploaded.
Updates #161
2018-04-17 15:21:38 +02:00
JC Brand
dad8eb2f48
Remove separate file converse-http-file-upload
...
It contained only `overrides` and some HTTP upload code was in other
modules.
Current thinking concerning overrides:
Usage of `overrides`, while useful in certain cases, should in general
be discouraged, since it's in essence "monkey patching" which makes it
more difficult to know whats executing at runtime and more difficult to
refactor.
Splitting modules up between XEPs is not always that useful. Some XEPs,
like HTTP Upload (and MAM comes to mind) have their functionality spread
out over single and group chats (and pubsub) and might for practical
purposes be considered "core" enough to not try and keep them in
separate modules (which inevitably requires overrides or a fundamentally
rethinking the architecture).
Where splitting code between modules makes a lot of sense is in keeping
Backbone Models and Views separate (so that alternative view libraries
like Vue could be used) and probably in keeping Single chats, MUC,
PubSub and MIX separate.
updates #161
2018-04-17 15:21:30 +02:00
JC Brand
de6ecbf07a
Render messages via a new MessageView view
...
updates #161
2018-04-17 15:21:26 +02:00
JC Brand
6cab7fcc41
Fix failing tests due to refactoring
...
updates #161
2018-04-17 15:21:16 +02:00
JC Brand
584f293d05
Updated and refactored the work from @worlword
...
* Use Promises instead of callbacks
* Update to latest (Last Call) version of XEP-0363
* Move non-view specific methods to models instead
* Add more tests
updates #161
2018-04-17 15:21:09 +02:00
JC Brand
9c2a5bd3b8
Merge branch 'worlword-httpFileUpload' into http-file-upload
2018-04-14 07:50:29 +02:00
JC Brand
a9d2881888
Fix disco hierarchy
...
Previously we kept all entities and their items (which are also
instances of _converse.DiscoEntity) in a flat array.
Instead, we should have a tree-like structure where items are stored
on the relevant entity (and recursively on other items).
2018-04-14 07:36:24 +02:00
worlword
3b1d27636d
problem fixed, that file-upload would not start. Also did some code cleanup
2018-04-13 11:45:43 +02:00
worlword
ca40cf6541
removed EmptyLines in ChatView.js and Change Lineendings to LF in toolbar_fileUpload.html
2018-04-12 09:37:58 +02:00
worlword
bf3e6f2363
some code-changes to align with the coding standard
2018-04-12 09:24:41 +02:00
worlword
7660dbfb31
merge httpFileUpload-Branch with master
2018-04-12 07:43:39 +02:00
JC Brand
3d29567ab6
Revert "Don't show typing from different device
CSN messages"
...
This reverts commit 7303e96cdb
.
Instead of dropping the feature entirely, we can check if the CSN is a
carbon message.
2018-04-11 18:46:50 +02:00
worlword
c9a9d01112
used code from 'http-file-upload' branch. Buttons are now added to the toolbars through converse-http-file-upload.js.
2018-04-11 17:09:32 +02:00
worlword
fa80749658
refactoring based on the review from jcbrand 06.Apr.2018
2018-04-11 15:29:41 +02:00
JC Brand
7303e96cdb
Don't show typing from different device
CSN messages
...
To avoid showing them erroneously would mean keeping track of used
message ids which seems like more work than justified by the feature.
Fixes #1026
2018-04-10 20:56:54 +02:00
JC Brand
9528d81c00
Move various MUC methods onto the Backbone.Model
...
To more cleanly separate views and models and to make MUC in headless
mode more viable.
Refs #1032
2018-04-10 18:59:02 +02:00
JC Brand
9a526d4194
Refactoring of the XEP-0085 Chat State Notifications code
...
* Distinguish between CSN messages and other types of messages
* Properly clear previous notifications
* Better handling of notifications from multiple users (in MUC)
* Rename methods to make clarify intent
2018-04-06 17:02:28 +02:00
worlword
7839f20846
fixed sendMessage for so that tests will work again
2018-04-05 08:45:58 +02:00
worlword
b23712aec3
added httpFileUpload to converse.js
2018-04-03 11:20:57 +02:00
ChaosKid42
fce9ee0db9
replace geoURIs (e.g. from Convesations) by links to openstreetmap ( #1054 )
...
* replace geoURIs by link to openstreetmap
* Added testcase
2018-03-31 18:29:01 +02:00
JC Brand
deff6e071c
Remove the clear
button. It was pretty useless
...
because it didn't actually clear anything permanently and upon page
reload the messages were there again.
2018-03-30 14:16:06 +02:00
JC Brand
516352c413
Disable emoji images by default
2018-03-30 14:16:06 +02:00
JC Brand
cb0b99ac37
Bugfix. Show message author in spoiler messages
2018-03-17 14:39:30 +00:00
JC Brand
2f46bb8ce7
Fix failing tests
2018-03-14 23:10:31 +00:00
JC Brand
2045741fbe
Add api.chatviews.get
method
2018-03-14 13:27:36 +00:00
JC Brand
044907e4fa
Looks like focus
parameter was never used.
2018-03-14 13:27:36 +00:00
JC Brand
03d7f07a4c
Bugfix. Chat wasn't being opened when receiving a message.
2018-03-13 19:11:49 +01:00
JC Brand
ca141401a0
Fix failing tests
2018-03-13 13:42:00 +01:00
JC Brand
c958a1822c
Remove unused code (due to bootstrap dropdowns)
2018-03-11 12:12:15 +01:00
JC Brand
c10a2596e3
Eagerly render emoji picker and avoid overflow in overlay view
2018-03-09 23:16:53 +01:00
JC Brand
9c0b7c71cd
Render OTR menu as a bootstrap dropdown
2018-03-09 17:30:42 +01:00
JC Brand
9825d6e777
Use bootstrap dropdown to render the emoji picker
2018-03-09 14:51:24 +01:00
JC Brand
8bddd0d7f4
Some work on showing emoji in a dropdown
2018-03-09 11:46:50 +01:00
JC Brand
914a55707d
Replace col-
classes with Sass mixins
2018-03-09 10:12:05 +01:00
JC Brand
d4d3d4c838
Merge branch 'split-muc' into bootstrap4
2018-03-05 16:51:33 +01:00
JC Brand
dcc6244fc2
Don't overwrite default avatar with undefined
2018-03-04 07:29:24 +01:00
JC Brand
47aad31899
Tricky refactoring.
...
Removed `_converse.chatboxviews.showChat` and trying to simplify how
chats are created and when they're shown.
Prompted by the work to split the MUC views into a separate plugin
2018-02-21 23:47:02 +01:00
JC Brand
ede21e7c32
Remove controlbox tabs and show rooms and contacts panels together
2018-02-16 14:16:55 +01:00
JC Brand
732c923324
Bugfix. Don't show hidden MUCs when new message received.
2018-02-14 13:44:17 +01:00
JC Brand
fc560bf8ac
Use this.content instead of ev.target, which is null
...
when using converse.js inside a webcomponent
2018-02-14 12:30:30 +01:00
JC Brand
5517e3554c
Add a new configuration setting: root
2018-02-09 16:08:39 +01:00
JC Brand
03b9447f1d
Asynchronously render spoiler button only if all clients support it
2018-02-08 17:48:15 +01:00
JC Brand
1759cc1672
Advertise support for spoilers
2018-02-07 17:25:49 +01:00
JC Brand
4732f315ed
Use "hidden message" instead of spoiler
2018-02-07 14:39:45 +01:00
JC Brand
4742e66b69
Fix linting errors and failing tests
2018-02-07 14:21:46 +01:00
JC Brand
9c3e9233e4
Test that the spoiler button is hidden when OTR is active
2018-02-07 13:16:34 +01:00
JC Brand
86a962bee2
Don't render message form via separate Backbone.View
...
Appeared to only complicate things...
2018-02-07 11:16:24 +01:00
JC Brand
20706cb617
Expand the spoiler tests
2018-02-06 21:21:21 +01:00
JC Brand
f6db2a9167
Use template to render the spoiler message.
2018-02-06 18:58:06 +01:00
JC Brand
3b850c77ea
Move focus
method into ChatBoxMessageForm
2018-02-06 18:05:12 +01:00
JC Brand
7ee0b19409
Move code to chatview
2018-02-06 18:05:12 +01:00
JC Brand
253c4d736e
Focus the textarea after toggling between spoiler or not
2018-02-06 18:05:12 +01:00
JC Brand
19d9e281ae
Update css and keep input and textarea values across toggles
2018-02-06 18:05:12 +01:00
JC Brand
d5348ea899
Render the message form via VDOMView
2018-02-06 18:05:12 +01:00
JC Brand
4e077aac08
Start moving code from the plugin to converse-chatview
2018-02-06 18:05:12 +01:00
JC Brand
400bdf775d
More refactoring of spoilers code
2018-02-06 18:05:12 +01:00
JC Brand
fa06b528e1
Also show spoiler for sent messages.
2018-02-06 18:05:12 +01:00
JC Brand
b1ffb34b76
Add docstrings
2018-02-06 18:05:12 +01:00
JC Brand
7f9f62476d
Render spoiler button as a template
2018-02-06 18:05:12 +01:00
JC Brand
34b592be09
Fixes #921
2018-01-29 15:16:44 +01:00
JC Brand
e5006b0004
Fixes #1000 . Scroll down when maximizing a chat room
2018-01-29 11:40:42 +01:00
JC Brand
4b64522c18
Fixes #993 .
2018-01-22 12:41:45 +01:00
JC Brand
db8fd5c018
Turn off message animations by default
2018-01-18 11:41:47 +01:00
JC Brand
210a75b02f
Scroll down again after all images have been loaded.
2018-01-17 19:29:11 +01:00
ChaosKid42
115b887802
Send emojis as unicode ( #977 )
...
* render the shortnames as unicode when sending a message
* updated CHANGES.md
2018-01-17 17:03:23 +01:00
JC Brand
e2a545a849
No need for animations during testing
2018-01-16 16:55:38 +01:00
JC Brand
8997af7890
Updates #984 Add color-fadein animation for messages
2018-01-16 16:36:23 +01:00
JC Brand
2cb4a36a6b
Updates #984 : Remember scroll position when using infinite scroll.
2018-01-16 15:38:08 +01:00
JC Brand
95bf69b8a9
Maintain simplicity by using only one variable instead of two
2018-01-16 14:56:58 +01:00
JC Brand
f1c8de15d1
Make DOM traversal methods more generic and move to utils.
2018-01-16 14:56:23 +01:00
JC Brand
9b3c6d1a3a
Fixes #985 Give help messages a "message" class and isodate data attr.
2018-01-15 20:32:24 +01:00
JC Brand
e9bba77b36
Add test for /help
command in private chats
2018-01-15 18:41:04 +01:00
JC Brand
76170427ec
Bugfix. Exclude chat events when looking for first/last/prev message
...
Also, don't clear events in `renderMessage`, try to keep it free from
side-effects.
2018-01-11 22:47:37 +00:00
JC Brand
8d999b2802
Explicit plugin dependencies. Make hide_open_bookmarks false by default
2018-01-10 13:26:50 +00:00
JC Brand
c22aff9b13
Use newest pluggable.js.
...
`optional_dependencies` is now called `dependencies`
2018-01-10 13:13:26 +00:00
JC Brand
4f227b467b
Take all messages except chat events into consideration
...
when determining where to insert new messages
2018-01-10 12:45:12 +00:00
JC Brand
da1f103532
Bugfix. Don't include .chat-events, to avoid null reference
2018-01-09 13:40:32 +00:00
JC Brand
2c7a942fbc
Remove unused declaration
2018-01-09 13:40:32 +00:00
JC Brand
16b8946dd9
Updates #978 : Use moment and generate date in correct format
2018-01-04 13:11:51 +00:00