Commit Graph

72 Commits

Author SHA1 Message Date
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
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
46fef28601 Clear messages when closing a chat 2019-05-19 22:11:37 +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
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
JC Brand
34469425d6 Use Object.assign instead of _.extend 2019-04-29 09:07:15 +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
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
c026dc8a86 New copyright year 2019-02-18 20:23:18 +01:00
JC Brand
a1a381428c Add converse-chatboxviews as dependency 2019-02-08 15:37:47 -07:00
JC Brand
01c3d35db2 Remove unnecessary webpack aliases 2018-11-15 11:29:28 +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
7cb889b065 Fixes #1317 Don't show errors for CSI messages 2018-11-14 14:34:23 +01:00
Christoph Scholz
da5ca0b585 implement XEP-0184: Message Delivery Receipts 2018-11-13 17:13:35 +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
JC Brand
609995c767 updates #1294 Pass i18n function to template 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
2f9089ee10 Updates #1261 More file upload fixes 2018-10-26 14:45:36 +02:00
JC Brand
e0f0617629 Don't store the File object in browserStorage
With the recent fixes in backbone.browserStorage, the 'file' attributes
gets persisted to browserStorage before Converse tries to upload the
file.

The File object can't actually be serialized, so an empty map gets
stored and then returned together with a 'change' event.

Instead, store the file as a direct attribute on the message object.

Fixes #1261
2018-10-24 22:59:43 +02:00
JC Brand
6904f9a897 Use es2015 modules instead of UMD 2018-10-23 12:25:58 +02:00
JC Brand
7590a030b0 Move unnecessary templates in headless package to main package 2018-10-22 13:59:06 +02:00
cmrd Senya
8ba8eb02fa Update main converse.js package to use @converse/headless
* Update moved dependencies references to @converse/headless
* Remove unused webpack resolve aliases
2018-10-22 12:44:38 +02:00
JC Brand
ceb0b82245 Two changes. See below
- No need for the `edited` event.
- Also, don't add load animation for MAM corrections
2018-10-16 21:58:36 +02:00
JC Brand
09c3d30ccc Make sure messages are marked as followups after re-render 2018-10-16 11:56:43 +02:00
JC Brand
0c58cb7c48 Add the show_images_inline option
updates #1228
2018-10-16 00:06:01 +02:00
JC Brand
e181aaf99b Make the message view's render method async
So that we first render dynamic content (e.g. images) before inserting
it into the chat.

Also, add the `show_images_inline` setting (which is the cause of this
whole change).

Updated tests to handle this new change and start using async/await
instead of promise callbacks.
2018-10-15 22:19:04 +02:00
JC Brand
7b9c97dfd3 Also squash leave/join messages
And fix an HTML rendering bug for info messages and nicks that contain spaces
2018-10-11 19:04:06 +02:00
JC Brand
148eaeacf5 Bugfix. Error messages don't have associated vcards 2018-10-02 18:04:03 +02:00
JC Brand
cfcab80147 Don't inform of unencryptable OMEMO messages unless in debug mode 2018-09-07 15:23:16 +02:00
JC Brand
023249f62e Render profile avatar as canvas.
We now have uniform avatar rendering for the profile, messages and
chatboxes.

By rendering as canvas, we can avoid stretching the image.

In the process I also moved the ChatBoxViews collection into its own
plugin `converse-chatboxviews` and placed the AvatarAware views there.

fixes #1157
2018-09-06 15:33:13 +02:00
JC Brand
1d38d8af03 Use twemoji for rendering emojis 2018-09-03 13:24:37 +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
d9c5867ff2 Check references when incrementing unread messages counter 2018-08-16 15:17:54 +02:00
JC Brand
b7eb19e225 Render mentions in a message 2018-08-16 15:17:54 +02:00
JC Brand
2884549bb3 Test decryption of incoming OMEMO message
updates #497
2018-08-04 23:49:01 +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
acd9a18696 Update with new message markup 2018-07-21 07:34:03 +02:00
Emmanuel Gil Peyrot
3fcf9acfcc Remove order constraint in chatstate message. 2018-07-14 18:26:42 +02:00
JC Brand
a9bb99a1a7 Show animation when a message has been corrected
updates #421
2018-07-08 13:43:28 +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
f3f58a8da4 Test multiple corrections of the same message 2018-07-06 01:51:27 +02:00
JC Brand
9e965fa20e Add a rudimentary message versions modal 2018-07-06 01:36:34 +02:00
JC Brand
19b9aeadfd Show an indicator that the message has been edited 2018-07-06 01:18:03 +02:00
JC Brand
b5a27b34a1 Render newlines 2018-06-30 15:07:30 +02:00
JC Brand
083f191ead Consider delayed, non-archived messages as "new"
New in the sense that we haven't seen them before
2018-06-07 13:06:32 +02:00
JC Brand
eed141b53e Remove unnecessary path aliases from the webpack config 2018-06-06 11:04:23 +02:00
JC Brand
6dc9e8edf1 Use webpack for module bundling 2018-05-25 14:23:32 +02:00
JC Brand
a33b451b73 Bugfix. Messages were losing followup class when re-rendered 2018-05-12 12:09:17 +02:00