Skip to content

Commit

Permalink
Merge pull request #46 from aaronvegh/av/session-pdsurl
Browse files Browse the repository at this point in the history
Ensure mention lookups work
  • Loading branch information
MasterJ93 authored Nov 3, 2024
2 parents 989e68e + 627ab89 commit 76da9f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ extension ATProtoBluesky {
// Compiling all parts of the post into one.
let postRecord = AppBskyLexicon.Feed.PostRecord(
text: postText,
facets: await ATFacetParser.parseFacets(from: postText, pdsURL: session.accessToken),
facets: await ATFacetParser.parseFacets(from: postText, pdsURL: session.pdsURL ?? "https://bsky.social"),
reply: resolvedReplyTo,
embed: resolvedEmbed,
languages: localeIdentifiers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ extension ComAtprotoLexicon.Identity {
public struct ResolveHandleOutput: Sendable, Decodable {

/// The resolved handle's decentralized identifier (DID).
public let handleDID: String
public let did: String
}
}
2 changes: 1 addition & 1 deletion Sources/ATProtoKit/Utilities/ATFacetParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public class ATFacetParser {

let mentionFacet = AppBskyLexicon.RichText.Facet(
index: AppBskyLexicon.RichText.Facet.ByteSlice(byteStart: start, byteEnd: end),
features: [.mention(AppBskyLexicon.RichText.Facet.Mention(did: mentionResult.handleDID))])
features: [.mention(AppBskyLexicon.RichText.Facet.Mention(did: mentionResult.did))])

await facets.append(mentionFacet)
} catch {
Expand Down

0 comments on commit 76da9f3

Please sign in to comment.