Is there a way to get a list of users subscribed to a given Lemmy community? Trying to do some Lemmy wide data analysis using that information.

Or alternatively, is there a way to get a list of communities a given user is subscribed to?

  • If you’re an admin of an instance which it seems you are, you can fetch some info of limited usefulness depending on where the community and users are.

    1. for remote communities, you can fetch which local users are subbed to it
    2. for local communities, you can fetch all users subbed to it

    There’s no UI or API (that I know of), but it can be fetched from the db.

    SELECT p.actor_id, cf.published 
    FROM community_follower cf 
    JOIN person p ON p.id = cf.person_id 
    JOIN community c ON c.id = cf.community_id 
    WHERE c.actor_id = 'https://lemm.ee/c/lemmydev';
    

    A lemm.ee admin would get all users since the community is on their instance.
    A sh.itjust.works admin would get sh.itjust.works users, etc.

    Obviously, if your instance has neither the community nor the users, that’s all moot.

    • Charlie Fish@eventfrontier.comOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 months ago

      Yeah ok. My server only has me as a user (minus a few test users). And all local communities are fairly small, so doesn’t really help me.

      So last paragraph really applies.

      Might make a feature suggestion on the Lemmy repo for this. Would be super interesting data to analyze.

      Thanks for your reply tho! Really appreciate it.