this post was submitted on 07 May 2024
100 points (98.1% liked)

Lemmy

12542 readers
21 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to [email protected].

founded 4 years ago
MODERATORS
 

If you write a plugin, let me know how it goes!

Link to PR

top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 6 months ago* (last edited 6 months ago)

Plugins may introduce some risks imo. Non-standard behaviour may be a b*tch.

E.g. the idea of a plugin which posts tags:

How are these elected and shares across instances? And displayed on clients? Are they modifying the actual data written by the user in order to sync?

Maybe they are attractive to admins. But they can mostlikely already query and modify the database, right?

I do not want to be against it just mentioning that it may introduce problems on its own which in turn needs to get adressed. E.g.: When multiple plugins do a task at the same hook; How is the ordering managed? When are transactions committed? Should there be a maximal amount of time spend on plugins at some hook? How are resources shared then?

Let's think about bad actors: Meta ~deploys~ provides a plugin which compresses and decompresses post content and saves plenty of ressources for the admin. After a couple of years they put it to the grave or change the compression methods such that old posts cant be retrieved. But their instance surely still can access those.

I admire beeing lean. Had some projects where bad plugins raised in popularity and become the defacto standard. But they were resource-hungry and badly written or barely maintained. Workarounds spread back to the original program.

Just looked the first time into the lemmy code and it appears to be very neat and clean. I would recommend to stick to it. But then I am no maintainer and a nobody shrugs

//edit: To me plugins are good to aid customization and enlarging the user base. I do not see how this contributes to the fediverse and instances in the long run.

[–] [email protected] 13 points 6 months ago* (last edited 6 months ago) (2 children)

a pretty simple plugin idea would be a regex to validate post titles, deny the post if the title is invalid

I might try it unless someone else beats me to it

I guess to start with it could be a config file with a dictionary of community name: regex

and later it could be made to use the database with an api to set the regexes, could even allow community moderators to set their own regexes (might need a maximum regex length, maximum number of parenthesis/groups in the regex pattern, and disable lookbehind/lookahead, for performance reasons)

[–] [email protected] 2 points 6 months ago

That's a good idea

[–] [email protected] 5 points 6 months ago* (last edited 6 months ago) (2 children)

~~Why a regex?~~ ~~What do you actually want to filter out?~~ ~~Could it be descriminating?~~

~~Do you want to prohibit specific phrases?~~ ~~What abt dfrnt spllngs?~~

The original comment I replied to did not include considerations about future extensions.

So my - downvoted - comment is even more relevant. There are more important things to put valuable manpower on it. centsdroppedandleave

What U C is What U Get, huh?

[–] [email protected] 2 points 6 months ago* (last edited 6 months ago)

Just saying it's an easy one to start with to get familiar with the system

And yeah it could be used to verify "tags" in the title, or require you put the year for something like a movie title or game, like (1993)

also my comment kicked off a little discussion in here, so that's nice too

[–] [email protected] 9 points 6 months ago

One example I could think of is title-tagged posts given the lack of a tag implementation