Commit Graph

154 Commits

Author SHA1 Message Date
JC Brand
2b732cdb94 Bump filesize to latest version and fix issues. 2023-06-09 14:55:09 +02:00
JC Brand
fde55bea2c Include XEP-0172 nick in all outgoing presence subscribe stanzas 2023-02-26 09:53:25 +01:00
JC Brand
3530ccc35d Add initial TypeScript support and declaration files 2023-02-23 09:38:11 +01:00
JC Brand
15c10376b0 Rename all templates to camelCase
To conform with naming conventions regarding functions, which the
templates are.
2023-02-15 14:29:07 +01:00
JC Brand
7539fc1a6f Move functions out of src/headless/core.js into utils 2022-12-28 21:36:40 +01:00
JC Brand
f740332e95 Fixes based on Github's code scanning results 2022-12-28 21:14:15 +01:00
JC Brand
78a7841afb Don't duplicate disco items across two collections
We now no longer have an `.items` collection on a disco entity.
Instead, add a new API method `api.disco.entities.items` should be used.

This should solve the issue of the entities disappearing when reloading
the page.

Updates #2925
2022-12-02 22:50:06 +01:00
JC Brand
a251608fc5 Fix race condition where waitUntilFeaturesDiscovered was resolved too early
When calling `api.supports(feature, entity_jid)`, it checks whether the entity
supports the feature or whether any of the sub-items on the entity
supports that feature.

However, on `DiscoEntity`, the `waitUntilFeaturesDiscovered` promise
didn't wait for the items on the entity to be fetched, and was therefore
resolved too quickly.

This caused the file upload button to not render.

Updates #2925
2022-11-08 20:03:37 +01:00
JC Brand
b2ad6e844c Fix chat head buttons not showing
We need to use `converse-icon` now that the fontawesome fonts aren't
included
2022-10-30 16:51:15 +01:00
JC Brand
bd60861c1e Don't import plugins' index.js file from other plugins
Importing a plugin's `index.js` file from other plugins means that it's no
longer possible to remove that plugin by removing it from `src/converse.js`.

Instead, all plugins need to be imported in proper order from
`src/headless/headless.js` and `src/converse.js`.

Updates #3026
2022-09-20 14:48:20 +02:00
JC Brand
fbe86e5af8 Create an ElementView base modal and use it for all modals
Modals are now all web components and are opened by component name.
2022-09-16 10:33:47 +02:00
JC Brand
927add0707 Wrap requestUpdate in an arrow function
Otherwise parameters from the event handler might be passed in to it,
causing potential weirdness.
2022-09-16 10:26:21 +02:00
JC Brand
0aa66fee99 CSS Fixes.
- Remove max height for MUC heading, otherwise subject text can get cut off
- Fix offset in mobile due to the background image
2022-08-27 16:40:13 +02:00
JC Brand
ca3c8fc10b Fixes #3007
Bugfix: Links in message become text when the message is edited
2022-08-20 11:12:59 +02:00
JC Brand
97be0bd8ac Styling: Use zero-width space and maintain position of newline char
Fixes #2879
2022-08-15 15:56:15 +02:00
Debanjana Sarkar
7f99b24e28 Fix for #2870 2022-08-15 15:54:29 +02:00
JC Brand
d8ea42a845 Add XEP-372 URI as data attribute to mention element 2022-07-19 11:59:55 +02:00
JC Brand
4aab83c4af Remove unused method 2022-07-14 08:47:39 +02:00
JC Brand
a95c070c2b Set autoprefixer version to fix compilation error 2022-06-22 14:05:03 +02:00
JC Brand
ba7c6d7a50 Let HeadlinesHeading use CustomElement 2022-06-19 13:03:06 +02:00
JC Brand
858a6051ac Refactoring of the headlines plugins
- Move template to relevant plugin
- Turn ElementView into CustomElement
- Use the terminology "Headlines Feed" instead of "Headlines Box"
- Break the `converse-headlines` plugin up into multiple files
- Fix CSS styling for headlines feeds for the Dracula theme
2022-05-13 16:49:45 +02:00
JC Brand
ab7e879261 Don't automatically convert OpenStreetMap URLs into geo: URIs in sent messages
Updates #1850 and #2914
2022-05-13 10:14:31 +02:00
JC Brand
a57853156e Use our own confirm dialog consistently 2022-05-12 23:23:24 +02:00
JC Brand
3c2eda4a1d Better documentation for getHeadingButtons 2022-04-25 09:58:27 +02:00
JC Brand
0260e5f803 Fix infinite loop in service discovery
When there is a circular dependency between disco entities (via their
advertised `disco#items`), Converse went into an infinite loop because
even though there was a check whether an entity already existed, it
failed to add newly created entities to the global
`_converse.disco_entities` collection.
2022-04-22 09:39:47 +02:00
JC Brand
699326547a Show MUC avatar 2022-04-20 09:52:17 +02:00
SilverYoCha
7cb86638b5 Fixing display problems with chatbox view with mobile view mode 2022-04-15 06:48:25 +02:00
JC Brand
0c049dd364 Resolve fetched promise when clearing messages
This fixes an issue where chats stay empty after reconnection when
`clear_messages_on_reconnection` is `true`.
2022-04-08 11:22:21 +02:00
SilverYoCha
b331405658 Bugfix: selected emoji inserted into all open chat boxes
when in overlay view mode.
2022-04-08 08:21:19 +02:00
JC Brand
9d4382c754 Move emoji functions to utils.js
Also, move various emoji utility methods out of @converse/headless, and
thereby remove the dependency on lit-html
2022-04-06 23:07:16 +02:00
JC Brand
af342456c5 Add enterkeyhint attribute to message form inputs 2022-04-06 09:55:56 +02:00
JC Brand
6b1845ff39 Release 9.1.0 2022-04-02 19:31:37 +02:00
JC Brand
f9a9d327d1 Use body as attribute for the message body text
For error messages we still use the `message` attribute, since error
messages generally don't have a body, and if one does, it likely refers
to the `body` of a rejected message that the error refers to.

We're still setting both `body` and `message` attributes, but usage of
`message` for a normal `chat`, `groupchat` or `headline` stanza should
be considered deprecated.
2022-03-14 09:28:34 +01:00
JC Brand
d2622f6fed Fixes #2557
Add the ability to send OMEMO corrections.

Refactor how OMEMO messages are sent to avoid having to override
`sendMessage` and thereby also allowing corrections of OMEMO messages to
be sent out.

Add two new hooks.
- getOutgoingMessageAttributes
- createMessageStanza
2022-03-13 10:02:34 +01:00
JC Brand
2133241998 CSS: Fix chat title width and elipsis color
in overlayed view mode.
2022-03-10 20:51:04 +01:00
JC Brand
e52056bb33 Refactor the emoji-picker somewhat
Trigger an `emojiSelected` event instead of manually calling `insertIntoTextArea` on the `converse-message-form` a component.
This loosens the coupling between the emoji picker and `converse-message-form`.

Call `disableArrowNavigation` when the emoji-picker is disconnected from
the DOM or when escape is pressed. See #2754
2022-03-09 12:44:33 +01:00
JC Brand
c42bd90c9d Don't clear textarea on escape, unless we're correcting a message 2022-03-09 11:24:32 +01:00
JC Brand
bbef09346a Various CSS fixes and use converse-icon for nav button 2022-02-19 23:09:39 +01:00
JC Brand
9a95c2d048 Normalize URL path
Udates #2814

Otherwise `"` gets escaped as `"` by lit-html which is not correct.
2022-02-15 14:38:40 +01:00
JC Brand
9a2424fa26 Fixes #2814. Links are mangled on open/copy 2022-02-15 14:10:40 +01:00
JC Brand
7f40d1a2f2 Fix #2627 2022-02-10 13:36:22 +01:00
JC Brand
12a2354d9e CSS: Fix chat heading colors 2022-02-09 21:38:30 +01:00
JC Brand
ac473fd297 Add dark theme Dracula
https://draculatheme.com
2022-01-28 20:28:48 +01:00
JC Brand
7c51147023 Use the parseMessageForCommands hook to also parse MUC commands
Also fix issue where `model.getAllowedCommands()` prevents 3rd party
implementations.
2022-01-28 12:40:21 +01:00
JC Brand
d06761e2a8 Fix failing tests 2022-01-27 19:12:35 +01:00
Dele Olajide
c83cc69cef Implement new hook parseMessageForCommands for plugins to add custom commands 2022-01-27 14:34:20 +01:00
JC Brand
c81841e036 Fix margin issues at different viewport sizes 2021-11-26 09:52:52 +01:00
JC Brand
3d74ed31c2 Fixes #2683, Updates #1317 2021-11-24 22:44:02 +01:00
JC Brand
1a6a7ade73 Fixes #2715 2021-11-24 21:52:40 +01:00
JC Brand
2af758e66d Not sending headers with upload request
Fixes #2728
2021-11-21 11:56:53 +01:00