• 𝒍𝒆𝒎𝒂𝒏𝒏
    link
    English
    21 year ago

    @rikodou@lemmings.world would it be possible to update this to only respond to users posting from a Lemmy or Kbin instance?

    We cam detect this at the moment by requesting /.well-known/nodeinfo.json and following the link in the href key

    https://lemmy.one/.well-known/nodeinfo

    https://lemmy.one/nodeinfo/2.0.json

    Kbin’s nodeinfo includes escape chars though, but I don’t think that would cause too much of a problem

    https://kbin.social/.well-known/nodeinfo

    Wonder if there is a library that could handle the detection part? I can try and contribute if one doesn’t exist

    Could also consider persisting the instance software to a local (sqlite?) database to save additional requests whenever a message comes in from a known instance