bluesky-social / atproto

Social networking technology created by Bluesky
Other
7.21k stars 510 forks source link

getFollows & getFollowers => Add the date of when it happend #2981

Open jycouet opened 1 week ago

jycouet commented 1 week ago

Is your feature request related to a problem? Please describe.

When I go to: https://atproto-browser.vercel.app/at/did:plc:dacfxuonkf2qtqft22sc23tu/app.bsky.graph.follow/3lapxwzhdj72i I can see that I followed someone at a certain time.

uri:
"at://did:plc:dacfxuonkf2qtqft22sc23tu/app.bsky.graph.follow/3lapxwzhdj72i"
cid:
"bafyreid6zzemxuoiewuezzqpcvbgfckeqvud22lq6qrkaumduofcgbg264"
value:
  $type:
  "app.bsky.graph.follow"
  subject:
  "did:plc:njxyxrv2w4x7rnpgv2gvavrq"
  createdAt:
  "2024-11-12T04:16:07.865Z"

So doing listRecords with xrpc works great.

Then I do

const agent = new Agent(new URL('https://public.api.bsky.app'))
const result = await agent.getFollows({ actor: "jyc.dev" })
console.log(result.data.follows[0])

I get the information of the subject, but I don't have access to the createdAt of the app.bsky.graph.follow.

For getFollowers, I can't access it directly with xrpc (The collection is not public I guess), so I have no way of knowing when the follow happend.

Describe the solution you'd like

Would be great to add a field: followedAt for both object. When you retreive the subject, you have the info, so I think it's all good. The issue is that you are sending directly the subject resolved... And it's not directly a subject information... And mixing data is not the best... Breaking the API is also not the best.

// Option 1
{  
  did: "..."
  handle: "..."
  ...
  followedAt: ""
}

// Option 2
{  
  did: "..."
  handle: "..."
  ...
  contextData: {
    followedAt: ""
  }
}

Maybe the Option 2 is a good threadoff ?

Additional context

I'll be happy to contribute after agreeing to a good solution. ✌️ Let me know what do you think

veekaybee commented 1 week ago

+1 to both this issue and contributing a solution if possible

I'm looking to do some quick analysis of how fast follower counts for accounts have gone up over the past week and would like to be able to collected aggregate follow events per actor with DID + timestamp if possible.

srsholmes commented 1 week ago

This would be really helpful to me as well.

I need to become more familiar with the protocol in order to contribute anything more meaningful but will hopefully be able to soon.

gunnarmorling commented 1 week ago

+1 Would love to have this, too.

MrGeislinger commented 1 week ago

+1 Would also love to see this!

est commented 1 week ago

also could we have a "remark" or "alias" field for a profile?

I cant remember exactly why/when I followed some guy in my >500 following list.

https://github.com/bluesky-social/atproto/issues/1405

https://github.com/bluesky-social/atproto/discussions/1672

jycouet commented 1 week ago

also could we have a "remark" or "alias" field for a profile?

I cant remember exactly why/when I followed some guy in my >500 following list.

1405

1672

I think that this is off topic & you probably don't want this info to be public.

est commented 5 days ago

I think that this is off topic & you probably don't want this info to be public.

oh, I see. I wasn't aware that getFollows and getFollowers were public data.

So its impossible to secretly follow someone (e.g. show latest content on my timeline) with atproto?

jycouet commented 5 days ago

oh, I see. I wasn't aware that getFollows and getFollowers were public data.

Yes it's public data

So its impossible to secretly follow someone (e.g. show latest content on my timeline) with atproto?

Anyone can go to your pds, and look who you follow, and what are your posts.