converse.js icon indicating copy to clipboard operation
converse.js copied to clipboard

Avoid emojis in converse@headless build

Open LMatass opened this issue 1 year ago • 4 comments

Hi,

Is there any headless build which doesn't include the emojis?

LMatass avatar Jun 11 '24 14:06 LMatass

The emojis are used when parsing the text of messages so that the is_only_emojis flag can be set. This code can be moved to hook handlers inside the emojis plugin, making it more self-contained (and thereby easier to disable or remove).

I've done that in a branch here: https://github.com/conversejs/converse.js/commit/7c415b58f0832992c2d5e5443ce4845d1de4e628

Once that's merged to master, it should be possible to add emojis to the blacklisted_plugins config setting, then the emojis JSON won't be loaded and emojis won't be used.

Alternatively you can create your own build that completely removes the emojis plugin, but I don't think you'll save much size that way, since the plugin isn't big, it's the JSON that's big and that is loaded dynamically when the plugin is active (i.e. not blacklisted).

jcbrand avatar Jun 12 '24 06:06 jcbrand

Good news!

How is the release process working? once you have many items to do a release of the package you do it?

Thanks for the quickness!

LMatass avatar Jun 12 '24 07:06 LMatass

Yes, there isn't a very formal process. You can help by creating a build yourself and testing it to see if there are any issues.

You can run npm build and that will create the necessary files in the dist folder.

jcbrand avatar Jun 12 '24 12:06 jcbrand

Will do, thanks!

LMatass avatar Jun 13 '24 09:06 LMatass