conversejs / converse.js

Web-based XMPP/Jabber chat client written in JavaScript
http://conversejs.org
Mozilla Public License 2.0
3.04k stars 763 forks source link

Avoid emojis in converse@headless build #3421

Open LMatass opened 3 weeks ago

LMatass commented 3 weeks ago

Hi,

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

jcbrand commented 3 weeks ago

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).

LMatass commented 3 weeks ago

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!

jcbrand commented 3 weeks ago

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.

LMatass commented 2 weeks ago

Will do, thanks!