diff --git a/pkg/api/websocket.go b/pkg/api/websocket.go index a49b237f7..8f996a12a 100644 --- a/pkg/api/websocket.go +++ b/pkg/api/websocket.go @@ -174,7 +174,7 @@ func (a *StreamplaceAPI) HandleWebsocket(ctx context.Context) httprouter.Handle } if profile != nil { p := map[string]any{ - "$type": "app.appbsky.actor.defs#profileViewBasic", + "$type": "app.bsky.actor.defs#profileViewBasic", "did": repoDID, "handle": profile.Handle, } diff --git a/pkg/atproto/profile.go b/pkg/atproto/profile.go index 8feac4da3..df9c4c43f 100644 --- a/pkg/atproto/profile.go +++ b/pkg/atproto/profile.go @@ -28,7 +28,7 @@ func (atsync *ATProtoSynchronizer) FetchUserProfile(ctx context.Context, usernam // Fetch full profile from Bluesky public API client := &xrpc.Client{ - Host: "https://public.api.appbsky.app", + Host: "https://public.api.bsky.app", } profile, err := appbsky.ActorGetProfile(ctx, client, actor) diff --git a/pkg/director/stream_session.go b/pkg/director/stream_session.go index b8a397086..d2fe186c6 100644 --- a/pkg/director/stream_session.go +++ b/pkg/director/stream_session.go @@ -508,7 +508,7 @@ func (ss *StreamSession) doUpdateStatus(ctx context.Context, repoDID string) err duration := int64(10) status := appbsky.ActorStatus{ - Status: "app.appbsky.actor.status#live", + Status: "app.bsky.actor.status#live", DurationMinutes: &duration, Embed: &actorStatusEmbed, CreatedAt: time.Now().Format(time.RFC3339), @@ -518,7 +518,7 @@ func (ss *StreamSession) doUpdateStatus(ctx context.Context, repoDID string) err getOutput := comatproto.RepoGetRecord_Output{} err = client.Do(ctx, xrpc.Query, "application/json", "com.atproto.repo.getRecord", map[string]any{ "repo": repoDID, - "collection": "app.appbsky.actor.status", + "collection": "app.bsky.actor.status", "rkey": "self", }, nil, &getOutput) if err != nil { @@ -536,7 +536,7 @@ func (ss *StreamSession) doUpdateStatus(ctx context.Context, repoDID string) err } inp := comatproto.RepoPutRecord_Input{ - Collection: "app.appbsky.actor.status", + Collection: "app.bsky.actor.status", Record: &glex.LexiconTypeDecoder{Val: &status}, Rkey: "self", Repo: repoDID, @@ -665,7 +665,7 @@ func (ss *StreamSession) DeleteStatus(repoDID string) error { return nil } inp := comatproto.RepoDeleteRecord_Input{ - Collection: "app.appbsky.actor.status", + Collection: "app.bsky.actor.status", Rkey: "self", Repo: repoDID, } diff --git a/pkg/integrations/discord/avatars.go b/pkg/integrations/discord/avatars.go index a679e3b0d..962172f86 100644 --- a/pkg/integrations/discord/avatars.go +++ b/pkg/integrations/discord/avatars.go @@ -24,7 +24,7 @@ func GetAvatarURL(ctx context.Context, did string) (string, error) { } xrpc := &xrpc.Client{ - Host: "https://public.api.appbsky.app", + Host: "https://public.api.bsky.app", Client: &aqhttp.Client, } diff --git a/pkg/linking/linking_test.go b/pkg/linking/linking_test.go index d3821298d..0e8970aab 100644 --- a/pkg/linking/linking_test.go +++ b/pkg/linking/linking_test.go @@ -48,7 +48,7 @@ func TestGenerateLinkCard(t *testing.T) { CreatedAt: "2025-03-25T00:39:49.121Z", Post: &comatproto.RepoStrongRef{ Cid: "bafyreiczmyne5jd4lpax5ttyb5p2fbcageyt6fsthdpyymecokcsmyh4a4", - Uri: "at://did:plc:2zmxikig2sj7gqaezl5gntae/app.appbsky.feed.post/3ll5zuomua22x", + Uri: "at://did:plc:2zmxikig2sj7gqaezl5gntae/app.bsky.feed.post/3ll5zuomua22x", }, Title: "Back up! Once again water in the firehose. Link cards if this stays stable", Url: &sp, @@ -110,7 +110,7 @@ func TestGenerateVideoCard(t *testing.T) { require.True(t, strings.Contains(linkStr, `content="`+video.Title+`"`), "og:title/twitter:title should be the video's own title") require.True(t, strings.Contains(linkStr, - "https://cdn.appbsky.app/img/feed_thumbnail/plain/did:plc:2zmxikig2sj7gqaezl5gntae/"+thumbCID+"@jpeg"), + "https://cdn.bsky.app/img/feed_thumbnail/plain/did:plc:2zmxikig2sj7gqaezl5gntae/"+thumbCID+"@jpeg"), "og:image should be the video thumbnail served via the bsky CDN") require.True(t, strings.Count(linkStr, "") == 1, "should have exactly one title tag") } diff --git a/pkg/model/block.go b/pkg/model/block.go index 1a6e5785e..e5d57608a 100644 --- a/pkg/model/block.go +++ b/pkg/model/block.go @@ -45,7 +45,7 @@ func (b *Block) ToStreamplaceBlock() (placestream.Defs_BlockView, error) { Cid: b.CID, IndexedAt: b.CreatedAt.Format(time.RFC3339), Record: block, - Uri: fmt.Sprintf(`at://%s/app.appbsky.graph.block/%s`, b.RepoDID, b.RKey), + Uri: fmt.Sprintf(`at://%s/app.bsky.graph.block/%s`, b.RepoDID, b.RKey), }, nil } diff --git a/pkg/model/bsky_profile.go b/pkg/model/bsky_profile.go index bf4cf196a..0f91ed9b8 100644 --- a/pkg/model/bsky_profile.go +++ b/pkg/model/bsky_profile.go @@ -50,7 +50,7 @@ func (m *DBModel) UpsertBskyProfile(ctx context.Context, aturi syntax.ATURI, rec func (m *DBModel) GetBskyProfile(ctx context.Context, did string, wasStreamplace bool) (*appbsky.ActorProfile, error) { var profile BskyProfile - err := m.DB.Where("uri = ? AND was_streamplace = ?", fmt.Sprintf("at://%s/app.appbsky.actor.profile/self", did), wasStreamplace).First(&profile).Error + err := m.DB.Where("uri = ? AND was_streamplace = ?", fmt.Sprintf("at://%s/app.bsky.actor.profile/self", did), wasStreamplace).First(&profile).Error if errors.Is(err, gorm.ErrRecordNotFound) { return nil, nil } diff --git a/pkg/model/feed_post.go b/pkg/model/feed_post.go index d5f9671d2..0a8ac890e 100644 --- a/pkg/model/feed_post.go +++ b/pkg/model/feed_post.go @@ -32,7 +32,7 @@ func (fp *FeedPost) ToBskyPostView() (appbsky.FeedDefs_PostView, error) { return appbsky.FeedDefs_PostView{}, fmt.Errorf("error decoding feed post: %w", err) } postView := appbsky.FeedDefs_PostView{ - LexiconTypeID: "app.appbsky.feed.defs#postView", + LexiconTypeID: "app.bsky.feed.defs#postView", Cid: fp.CID, Uri: fp.URI, Author: appbsky.ActorDefs_ProfileViewBasic{ diff --git a/pkg/spxrpc/app_bsky_actor.go b/pkg/spxrpc/app_bsky_actor.go index bf44379de..e47b1d74d 100644 --- a/pkg/spxrpc/app_bsky_actor.go +++ b/pkg/spxrpc/app_bsky_actor.go @@ -11,7 +11,7 @@ import ( ) func bskyCDNURL(kind, did, cid string) *string { - ret := fmt.Sprintf("https://cdn.appbsky.app/img/%s/plain/%s/%s@jpeg", kind, did, cid) + ret := fmt.Sprintf("https://cdn.bsky.app/img/%s/plain/%s/%s@jpeg", kind, did, cid) return &ret } diff --git a/pkg/spxrpc/app_bsky_feed.go b/pkg/spxrpc/app_bsky_feed.go index f7c5fcaaf..08b205cdf 100644 --- a/pkg/spxrpc/app_bsky_feed.go +++ b/pkg/spxrpc/app_bsky_feed.go @@ -14,7 +14,7 @@ import ( "stream.place/streamplace/pkg/model" ) -var FeedSkeletonRE = regexp.MustCompile(`^at://did:(web|plc):([a-z0-9\.\-]+)/app.appbsky.feed.generator/([a-z0-9\.\-]+)$`) +var FeedSkeletonRE = regexp.MustCompile(`^at://did:(web|plc):([a-z0-9\.\-]+)/app.bsky.feed.generator/([a-z0-9\.\-]+)$`) func parseFeedSkeleton(did string) (string, string, error) { matches := FeedSkeletonRE.FindStringSubmatch(did) diff --git a/pkg/spxrpc/feed_test.go b/pkg/spxrpc/feed_test.go index a7f1e6e23..29d4083b5 100644 --- a/pkg/spxrpc/feed_test.go +++ b/pkg/spxrpc/feed_test.go @@ -14,19 +14,19 @@ func TestFeedSkeletonRE(t *testing.T) { want bool }{ { - feed: "at://did:plc:oio4hkxaop4ao4wz2pp3f4cr/app.appbsky.feed.generator/atproto", + feed: "at://did:plc:oio4hkxaop4ao4wz2pp3f4cr/app.bsky.feed.generator/atproto", did: "did:plc:oio4hkxaop4ao4wz2pp3f4cr", name: "atproto", want: true, }, { - feed: "at://did:web:iame.li/app.appbsky.feed.generator/feedwithnumbers123", + feed: "at://did:web:iame.li/app.bsky.feed.generator/feedwithnumbers123", did: "did:web:iame.li", name: "feedwithnumbers123", want: true, }, { - feed: "at://did:web:iame.li/app.appbsky.feed.generator/feed-with-dashes", + feed: "at://did:web:iame.li/app.bsky.feed.generator/feed-with-dashes", did: "did:web:iame.li", name: "feed-with-dashes", want: true, @@ -36,15 +36,15 @@ func TestFeedSkeletonRE(t *testing.T) { want: false, }, { - feed: "at:///app.appbsky.feed.generator/feedwithnumbers123", + feed: "at:///app.bsky.feed.generator/feedwithnumbers123", want: false, }, { - feed: "at://did:web:iame.li/app.appbsky.feed.generator/", + feed: "at://did:web:iame.li/app.bsky.feed.generator/", want: false, }, { - feed: "at://did:web:iame.li/app.appbsky.feed.generator/feedwithnumbers123/errantsuffix", + feed: "at://did:web:iame.li/app.bsky.feed.generator/feedwithnumbers123/errantsuffix", want: false, }, } diff --git a/pkg/spxrpc/graph.go b/pkg/spxrpc/graph.go index b00fedc30..41bd1bbc9 100644 --- a/pkg/spxrpc/graph.go +++ b/pkg/spxrpc/graph.go @@ -28,7 +28,7 @@ func (s *Server) handlePlaceStreamGraphGetFollowingUser(ctx context.Context, sub if follow != nil { output.Follow = &comatproto.RepoStrongRef{ Cid: "", // We don't store CID in our model - Uri: fmt.Sprintf("at://%s/app.appbsky.graph.follow/%s", userDID, follow.RKey), + Uri: fmt.Sprintf("at://%s/app.bsky.graph.follow/%s", userDID, follow.RKey), } } diff --git a/pkg/spxrpc/place_stream_badge.go b/pkg/spxrpc/place_stream_badge.go index b005e29ef..69fd6ac19 100644 --- a/pkg/spxrpc/place_stream_badge.go +++ b/pkg/spxrpc/place_stream_badge.go @@ -108,7 +108,7 @@ func (s *Server) handlePlaceStreamBadgeGetIssuedBadges(ctx context.Context, stre view.Description = &def.Description } if def.ImageCID != "" { - imageUrl := fmt.Sprintf("https://cdn.appbsky.app/img/feed_fullsize/plain/%s/%s@png", def.RepoDID, def.ImageCID) + imageUrl := fmt.Sprintf("https://cdn.bsky.app/img/feed_fullsize/plain/%s/%s@png", def.RepoDID, def.ImageCID) view.ImageUrl = &imageUrl } isSelected := selectedURIs[issuance.URI] diff --git a/pkg/spxrpc/place_stream_game.go b/pkg/spxrpc/place_stream_game.go index 641d3dda0..b9921a3d2 100644 --- a/pkg/spxrpc/place_stream_game.go +++ b/pkg/spxrpc/place_stream_game.go @@ -148,7 +148,7 @@ func (s *Server) handlePlaceStreamGameGetGame(ctx context.Context, uri string) ( var coverUrl *string for _, m := range record.Value.Media { if (m.MediaType == "cover" || m.MediaType == "coverSquare") && m.Blob.Ref.Link != "" { - u := "https://cdn.appbsky.app/img/feed_thumbnail/plain/" + did + "/" + m.Blob.Ref.Link + "@jpeg" + u := "https://cdn.bsky.app/img/feed_thumbnail/plain/" + did + "/" + m.Blob.Ref.Link + "@jpeg" coverUrl = &u break } diff --git a/pkg/spxrpc/place_stream_live.go b/pkg/spxrpc/place_stream_live.go index 2dc71ffd0..c21af6b91 100644 --- a/pkg/spxrpc/place_stream_live.go +++ b/pkg/spxrpc/place_stream_live.go @@ -620,7 +620,7 @@ func (s *Server) handlePlaceStreamLiveStartLivestream(ctx context.Context, body Features: []appbsky.RichtextFacet_Features_Elem{ { RichtextFacet_Link: &appbsky.RichtextFacet_Link{ - LexiconTypeID: "app.appbsky.richtext.facet#link", + LexiconTypeID: "app.bsky.richtext.facet#link", Uri: canonicalUrl, }, },