Commit Graph

61 Commits

Author SHA1 Message Date
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
JC Brand
b6692b17a2 Show roles from VCard next to name in messages 2018-05-08 19:51:56 +02:00
JC Brand
776f49d5c3 Bugfix. Don't remove model, simply remove view
Otherwise the model gets removed mid-creation, which causes the
`url required` error from Backbone.
2018-05-07 12:57:05 +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
16b2a1b2a9 Avatar/VCard refactoring
- Refer to VCards instead of Avatars where appropriate
- Fetch VCards for non-groupchat messages as well
2018-05-03 18:34:28 +02:00
JC Brand
d5c8acea04 Create avatar objects for all messages, not just groupchat 2018-05-03 18:24:24 +02:00
JC Brand
cbc48629f1 Clear canvas before redrawing 2018-05-01 19:55:26 +02:00
JC Brand
53f5627b72 Add support for rendering avatars in groupchats 2018-05-01 18:18:02 +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
1405d9cb49 Also style file upload and action messages. 2018-04-30 15:37:37 +02:00