Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct Information about remote magazines #217

Closed
BentiGorlich opened this issue Nov 7, 2023 · 13 comments · Fixed by #235
Closed

Correct Information about remote magazines #217

BentiGorlich opened this issue Nov 7, 2023 · 13 comments · Fixed by #235
Assignees
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests enhancement New feature or request pr pending An associated pull request is pending approval

Comments

@BentiGorlich
Copy link
Member

Is your feature request related to a problem? Please describe.
The amount of subscribers of remote magazines and users is wrong. It only shows the the amount of local subscribers/followers.
Additionally the moderator of remote magazines is always the local admin, not the actual moderators of the magazine.

Describe the solution you'd like
The correct info should be fetched when initially looking a magazine or user up. Afterwards it should periodically refetch this information

Describe alternatives you've considered
Imo the solution above is the only one that is correct

@BentiGorlich BentiGorlich added enhancement New feature or request activitypub ActivityPub related issues backend Backend related issues and pull requests labels Nov 7, 2023
@e-five256
Copy link
Member

I thought the amount of subscribers being local only was a limitation of AP but it does appear mastodon is able to do it mastodon/mastodon#4840

@BentiGorlich
Copy link
Member Author

How To get moderators from lemmy:

curl --header "Accept: application/activity+json" https://feddit.de/c/aufmuepfig
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "lemmy": "https://join-lemmy.org/ns#",
      "litepub": "http://litepub.social/ns#",
      "pt": "https://joinpeertube.org/ns#",
      "sc": "http://schema.org/",
      "ChatMessage": "litepub:ChatMessage",
      "commentsEnabled": "pt:commentsEnabled",
      "sensitive": "as:sensitive",
      "matrixUserId": "lemmy:matrixUserId",
      "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
      "removeData": "lemmy:removeData",
      "stickied": "lemmy:stickied",
      "moderators": {
        "@type": "@id",
        "@id": "lemmy:moderators"
      },
      "expires": "as:endTime",
      "distinguished": "lemmy:distinguished",
      "language": "sc:inLanguage",
      "identifier": "sc:identifier"
    }
  ],
  "type": "Group",
  "id": "https://feddit.de/c/aufmuepfig",
  "preferredUsername": "aufmuepfig",
  "inbox": "https://feddit.de/c/aufmuepfig/inbox",
  "followers": "https://feddit.de/c/aufmuepfig/followers",
  "publicKey": {
    "id": "https://feddit.de/c/aufmuepfig#main-key",
    "owner": "https://feddit.de/c/aufmuepfig",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwzKILm49/9ESwofC78NZ\nY/NCrBn58ljo8a5IEXM8NsunYQp/P8GE1/zPO2lZcg3bZQK4pWk9qnMUBGf07T1D\nSomn55/jy4QEzBJAPyD5IVfuMRKu0tt4LhiErtqzxU7xgTjhGvLpIQSPluN9G1vT\n7ma3b34IH10uWaTNad13Bxrfmllfe3jNvH64DprSK6C3jpSRt052PYSk8OjOEX+K\nb/6p17cJ45Ey3akY7eiEFC9JF/iZw0NRA0tX8+nbNRPwd92WgJftHRIbNvVInF2X\n7tbcc20iNPYvtUk+RiTEIY30ONOSTgUcaMj7SqDVBkrr8G+6H0240IGajov0JqwZ\nAQIDAQAB\n-----END PUBLIC KEY-----\n"
  },
  "name": "Aufmüpfig",
  "summary": "<p>Willkommen bei <strong>Aufmüpfig</strong>! Eine Plattform für rebellische Geister, erschreckende Ideen und verwegene Memes.</p>\n<p>Gemeinsam setzen wir uns für soziale Gerechtigkeit, Antikapitalismus, Antifaschismus, Queerfeminismus, Klimagerechtigkeit und eine bessere Welt ein.</p>\n<p>Schließ dich uns an und werde Teil dieser aufmüpfigen Community!</p>\n",
  "source": {
    "content": "Willkommen bei **Aufmüpfig**! Eine Plattform für rebellische Geister, erschreckende Ideen und verwegene Memes. \n\nGemeinsam setzen wir uns für soziale Gerechtigkeit, Antikapitalismus, Antifaschismus, Queerfeminismus, Klimagerechtigkeit und eine bessere Welt ein. \n\nSchließ dich uns an und werde Teil dieser aufmüpfigen Community!\n",
    "mediaType": "text/markdown"
  },
  "icon": {
    "type": "Image",
    "url": "https://feddit.de/pictrs/image/aab25f21-aa16-42ef-9468-9e8638428c5d.png"
  },
  "sensitive": false,
  "attributedTo": "https://feddit.de/c/aufmuepfig/moderators",
  "postingRestrictedToMods": false,
  "outbox": "https://feddit.de/c/aufmuepfig/outbox",
  "endpoints": {
    "sharedInbox": "https://feddit.de/inbox"
  },
  "featured": "https://feddit.de/c/aufmuepfig/featured",
  "language": [
    {
      "identifier": "und",
      "name": "Undetermined"
    },
    {
      "identifier": "de",
      "name": "Deutsch"
    },
    {
      "identifier": "en",
      "name": "English"
    }
  ],
  "published": "2023-06-04T14:41:27.632065+00:00",
  "updated": "2023-06-10T22:22:19.490658+00:00"
}

Lemmy uses the attributedTo to link the moderators. I don't know whether that is spec compliant or whatever, but one can get it there...

curl --header "Accept: application/activity+json" https://feddit.de/c/aufmuepfig/moderators
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "lemmy": "https://join-lemmy.org/ns#",
      "litepub": "http://litepub.social/ns#",
      "pt": "https://joinpeertube.org/ns#",
      "sc": "http://schema.org/",
      "ChatMessage": "litepub:ChatMessage",
      "commentsEnabled": "pt:commentsEnabled",
      "sensitive": "as:sensitive",
      "matrixUserId": "lemmy:matrixUserId",
      "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
      "removeData": "lemmy:removeData",
      "stickied": "lemmy:stickied",
      "moderators": {
        "@type": "@id",
        "@id": "lemmy:moderators"
      },
      "expires": "as:endTime",
      "distinguished": "lemmy:distinguished",
      "language": "sc:inLanguage",
      "identifier": "sc:identifier"
    }
  ],
  "type": "OrderedCollection",
  "id": "https://feddit.de/c/aufmuepfig/moderators",
  "orderedItems": [
    "https://feddit.de/u/Aequitas",
    "https://feddit.de/u/Dschingis_Pelikan",
    "https://feddit.de/u/Mrs_deWinter"
  ]
}

@BentiGorlich
Copy link
Member Author

To get the subscriber count:

curl --header "Accept: application/activity+json" https://feddit.de/c/aufmuepfig/followers
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "lemmy": "https://join-lemmy.org/ns#",
      "litepub": "http://litepub.social/ns#",
      "pt": "https://joinpeertube.org/ns#",
      "sc": "http://schema.org/",
      "ChatMessage": "litepub:ChatMessage",
      "commentsEnabled": "pt:commentsEnabled",
      "sensitive": "as:sensitive",
      "matrixUserId": "lemmy:matrixUserId",
      "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
      "removeData": "lemmy:removeData",
      "stickied": "lemmy:stickied",
      "moderators": {
        "@type": "@id",
        "@id": "lemmy:moderators"
      },
      "expires": "as:endTime",
      "distinguished": "lemmy:distinguished",
      "language": "sc:inLanguage",
      "identifier": "sc:identifier"
    }
  ],
  "id": "https://feddit.de/c/aufmuepfig/followers",
  "type": "Collection",
  "totalItems": 1092,
  "items": []
}

@BentiGorlich
Copy link
Member Author

Ok, so Lemmy uses a property from the offical activity pub standard: attributedTo
At the moment mbin and kbin just added a moderators property which is not part of the standard. I think we should just implement it the way lemmy does as well. It is a valid standardized response although the description of "attributed to" does not really match for moderator:

Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.

@BentiGorlich BentiGorlich self-assigned this Nov 7, 2023
@e-five256
Copy link
Member

Maybe related fep-1b12. Think this is just proposals, but it seems to have come from lemmy.

@BentiGorlich
Copy link
Member Author

BentiGorlich commented Nov 7, 2023 via email

@BentiGorlich BentiGorlich added the pr pending An associated pull request is pending approval label Nov 10, 2023
@MHLoppy
Copy link

MHLoppy commented Nov 29, 2023

If I may jump in as a user (not a dev), I think there's still value in the local information.

Re: subscriber count, the remote subscriber count is also not an accurate representation of all subscribers, as that still only tracks the host instance's local subscribers for that magazine/community. Having the local number and not just the remote number can help to give a sense of how concentrated a magazine/community is on its host instance, plus how much representation is in your local instance by comparison. The local sub count can help to understand what people on a given instance are interested in.

Re: mods, user reports on a user's instance are (if it works the way I think it does?) being sent to both the local instance mod(s) and the remote instance mod(s) for that magazine/community. It's entirely possible for the user's local instance to want to action a post based on local instance rules even if the rules of the remote instance or its magazine/community's rules haven't been broken. Thus I think there's still value in showing who would be receiving those reports on the local instance.

In both cases I would ideally like to have both the local and remote information shown for these two fields if that's something that could be shown without ending up too clunky or confusing UI-wise?

@e-five256
Copy link
Member

e-five256 commented Nov 29, 2023

Re: subscriber count

I agree it'd be nice to see, not just for the points you mentioned but also because it was thought to be the key of whether your instance even gets data; magazines with 0 local subscribers tend to not receive any updates. I had discussed making this a blocker to v1.2.0, but for a few reasons changed my mind: one of those being that I realized that's just happenstance with, most likely, Lemmy that 0 subscribers mean no more updates. I noticed other linked software continues to send federated information regardless of unsubscribing.

So I felt it might need more investigation if there is a way to even tell whether you're getting information anymore from the source, not sure if AP has a way to ask the source. Also not sure if AP provides a method similar to CAN-SPAM, something I need to look in to, because it seems some software could just not honor unfollow requests and continue sending you information.

Regardless of all that, ironically right before you posted this I was looking into adding local sub count to the sidebar, my plan for it being in an aria-label, title of the sub count so when you hover over it, it says 10000 Subscribers (10 local) or something similar. Might not be fully what you're looking for, but I feel it helps keep the UI clean from too much information. I'm just not sure myself how easy it is or if we lost that information with this, hopefully not

Re: mods

I'm not sure I fully follow on local mods, I'm not aware of whether instances are appointing local mods to remote magazines, that's definitely not a workflow I've thought about and not sure it would be valid. We're pretty sure reports for remote content do not make it to the remote instance, basing it off the fact that you can't even direct message remote users. I thought we had an issue related to this but I see now @BentiGorlich's issue was more about getting notifications about reports happening at all, not remote reporting.

To your other point, I just mentioned this in #306, won't link it since it's not too related, but I had said:

I want to do the same to report but looking at the report panel, it looks like I want to redo the UX for that as well to make it clearer: what you're reporting, who you're reporting to, why you're reporting it (predefined options). which may or may not be related to the issue we have to get remote reporting working

I think my plans to rework the UX of reporting are blocked behind being able to actually report remote content, though maybe it can be split up

(To clarify, your reports go to local mods and the local admin/global mods, but for remote magazines obviously that would only be the local admin/global mods, nothing about the changes from the PR linked to this issue changed that, as it's how it always worked)

@BentiGorlich
Copy link
Member Author

@MHLoppy

Re: subscriber count

The information from the remote instance are not just subscribers on their instance. The "original" instance keeps track of everybody who is subscribed to a magazine otherwise, how would the instance know where it needs to send new posts. So this number we now display is the total number of subscribers a remote magazine has. I agree that the local sub count could be useful, but outside of "no one on our instance subscribed, so this magazine might now get updates" I don't see the value of a real counter for local subs.

Re: mods

Reports should always go to your local admin and the global mods as well as the mods of a magazine. I do not understand why an instance would have mods specifically for a magazine that is not the property of said instrance (aka a remote magazine).

Re: reports

I do not think that we should list all the accounts that will probably get the report. It is true that your local mods and admins as well as the remote magazine's mods should get the report and we can describe that in the text above the input field, however I do not think that we should list the specific mods/admins for the post that you are reporting.

@BentiGorlich
Copy link
Member Author

@e-five256 if something still sends you data although nobody on you instance is subscribed to the group (AP term) or the actor fo the post than that is just wrong. You are not part of the audience if no one on your instance is "listening" and the remote server should respect that. So no there is not a endpoint to check whether you still get updates, because in theory you should have all the info needed. Maybe we should start rejecting posts where we do not belong to the audience?

@MHLoppy
Copy link

MHLoppy commented Nov 30, 2023

@e-five256

Regardless of all that, ironically right before you posted this I was looking into adding local sub count to the sidebar, my plan for it being in an aria-label, title of the sub count so when you hover over it, it says 10000 Subscribers (10 local) or something similar. Might not be fully what you're looking for, but I feel it helps keep the UI clean from too much information. I'm just not sure myself how easy it is or if we lost that information with this, hopefully not

Something like that would be nice!

[mods stuff]

Some bad wording on my part, didn't mean to imply local instance moderators for a remote instance, just the local instance admin(s).

@MHLoppy
Copy link

MHLoppy commented Nov 30, 2023

@BentiGorlich

The information from the remote instance are not just subscribers on their instance. The "original" instance keeps track of everybody who is subscribed to a magazine otherwise, how would the instance know where it needs to send new posts. So this number we now display is the total number of subscribers a remote magazine has. I agree that the local sub count could be useful, but outside of "no one on our instance subscribed, so this magazine might now get updates" I don't see the value of a real counter for local subs.

Ah, I seem to have carried a misunderstanding over from when everyone was new and nobody knew how anything worked (but guessed) - thanks for clearing that up! I had been under the impression even the home instance only reported local subscriber counts (and only tracked subscribed instances, so didn't actually know the "true total" subscriber count).

Reports should always go to your local admin and the global mods as well as the mods of a magazine. I do not understand why an instance would have mods specifically for a magazine that is not the property of said instrance (aka a remote magazine).

Yep, just meant the local instance admins - didn't mean to imply mod-level users at the local instance policing a remote instance.

I do not think that we should list all the accounts that will probably get the report. It is true that your local mods and admins as well as the remote magazine's mods should get the report and we can describe that in the text above the input field, however I do not think that we should list the specific mods/admins for the post that you are reporting.

Fair enough! If the current thinking is to have something such as text saying as much that would be totally fine; I was just wanting to have the user know that (if the report does federate out, which sounds like it currently doesn't for kbin/mbin?) that both the local and remote ends get that report. So a specific list of local instance admins and a "btw this report goes to X and Y" are basically interchangeably able to fulfill that goal for me.

@BentiGorlich
Copy link
Member Author

I created an issue for improving the report dialog: #318
As to federating reports, I have a WIP PR: #249 . It still needs a bit of work, as stated in a comment by me on there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests enhancement New feature or request pr pending An associated pull request is pending approval
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants