83
submitted 3 months ago* (last edited 3 months ago) by qaz@lemmy.world to c/memes@lemmy.world

Code for people interested https://codeberg.org/rimu/pyfedi/src/branch/main/app/admin/routes.py#L373

I commented it out, rebuild the Docker containers and it works now ๐Ÿ‘

you are viewing a single comment's thread
view the rest of the comments
[-] darkevilmac@lemmy.zip 16 points 3 months ago

Jesus that's a lot of spaghetti code, and why are they hardcoding a bunch of terms? Is this just for a public facing site, or does every deployed instance effectively filter these out?

[-] qaz@lemmy.world 20 points 3 months ago* (last edited 3 months ago)

It's hardcoded in the PieFed source code, so every instance does this by default unless you patch it like I did.

The combined swearwords + excluded communities list seems to appear at least 3 times in the codebase (not referenced, copied verbatim).

Let's just say that it wouldn't pass my code review if I saw this at work

EDIT: It has been removed from 2/3 places in the codebase.

[-] BruisedMoose@piefed.social 4 points 3 months ago

Yeah. The list should be in the site config. Go ahead and include those as defaults to block, but allow sites to override that.

OP, are you saying that the federation is blocked on the OUTGOING side? Because then that just seems bass ackwards.

[-] qaz@lemmy.world 2 points 3 months ago

No, it's incoming. When you first set up an instance you have to kickstart the federation process by adding communities to federate. The linked code excludes those specified communities from that. Once federated, they won't be blocked AFAIK.

this post was submitted on 01 Jan 2026
83 points (97.7% liked)

memes

21006 readers
233 users here now

Community rules

1. Be civilNo trolling, bigotry or other insulting / annoying behaviour

2. No politicsThis is non-politics community. For political memes please go to !politicalmemes@lemmy.world

3. No recent repostsCheck for reposts when posting a meme, you can only repost after 1 month

4. No botsNo bots without the express approval of the mods or the admins

5. No Spam/Ads/AI SlopNo advertisements or spam. This is an instance rule and the only way to live. We also consider AI slop to be spam in this community and is subject to removal.

A collection of some classic Lemmy memes for your enjoyment

Sister communities

founded 2 years ago
MODERATORS