Shorten the mention-facet comment to one line

This commit is contained in:
Paulo Castellano 2026-06-13 18:16:24 -03:00
parent 5cafac34c1
commit 5d80caffef

View file

@ -211,12 +211,7 @@ private function parseFacets(string $text, ?string $service = null, ?SocialAccou
$mention = $match[0];
$handle = substr($mention, 1); // Remove @
// A mention facet requires the target's DID, not the handle. Bluesky
// does NOT resolve a handle placed in the `did` field — sending one
// makes the whole record invalid (InvalidRequest / "Invalid post
// data"), so every post containing a mention fails to publish.
// Resolve the handle to a DID here; if it can't be resolved, skip the
// facet so the post still publishes with the @handle as plain text.
// A mention facet needs the target's DID, not the handle; skip it if unresolvable.
$did = $didCache[$handle] ?? ($didCache[$handle] = $this->resolveHandleToDid($handle, $service, $account));
if ($did === null) {
continue;