Function: attachBlueskyPostToDocument()
attachBlueskyPostToDocument(
agent,eprintUri,postRef):Promise<null|string>
Defined in: web/lib/atproto/record-creator.ts:2572
Attach the announcing Bluesky post to an eprint's standard.site document.
Parameters
agent
Agent
Authenticated agent for the repo holding the document
eprintUri
string
AT-URI of the eprint that was shared
postRef
Strong reference to the Bluesky post
Returns
Promise<null | string>
AT-URI of the document updated, or null when there is none
Throws
Error if the agent is not authenticated
Remarks
site.standard.document.bskyPostRef exists to "keep track of comments
off-platform". Recording it makes the announcing post's reply thread
discoverable from the document, which is what lets a reader — Chive's own
eprint page, or any other standard.site consumer — show the Bluesky
discussion of a paper alongside it.
Returns null rather than throwing when no document exists: sharing an eprint whose submitter turned cross-platform discovery off is an ordinary thing to do, and the share has already succeeded by the time this runs. A share must never fail because a secondary record could not be updated.