• ben@lemmy.zip
    link
    fedilink
    English
    arrow-up
    44
    ·
    8 hours 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.worldOP
      link
      fedilink
      English
      arrow-up
      53
      ·
      edit-2
      7 hours 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

    • BruisedMoose@piefed.social
      link
      fedilink
      English
      arrow-up
      11
      ·
      8 hours 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.worldOP
        link
        fedilink
        English
        arrow-up
        6
        ·
        8 hours 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.