[Bug]: `updateProfileRecord` drops the profile's `links` on every update
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- swift
調査の方向性
UpdateProfileRecord.swiftを読み、特に69~77行付近の既存フィールドのコピーと、189~200行付近のProfileRecordイニシャライザを確認してください。replaceが値をどのように選択し、putRecordがプロフィールをどのように書き込むかを追ってください。別のフィールドを更新しても既存のlinksが保持されれば完了です。利用可能であれば、該当するプロフィール更新テストを実行してください。
索引モデルが issue の本文から書いたものです。
説明
Summary
ATProtoBluesky.updateProfileRecord(profileURI:replace:) reads the existing profile record, rebuilds it as a new AppBskyLexicon.Actor.ProfileRecord, and writes it back with putRecord. The rebuilt record never carries over links, so any update — even one that only changes pinnedPost or labels — removes all of the profile's links (app.bsky.actor.profile#links, the ordered strongRefs to app.bsky.actor.link records).
Reproduction Steps
- Use an account whose
app.bsky.actor.profile/selfrecord has a non-emptylinksarray (e.g. one set from the official Bluesky app). - Call
updateProfileRecord(profileURI:replace:)with any field, e.g.replace: [.pinnedPost(with: someReference)]. - Fetch the profile record again with
getRepositoryRecord, or the profile withgetProfile.
Expected Results
Fields not listed in replace are preserved, including links.
Actual Results
links is removed from the profile record, and getProfile no longer returns any links.
What operating systems did you experience this bug?
macOS
Operating System Version
macOS Golden Gate 27.2
ATProtoKit Version
0.34.1
Additional Context
The app.bsky.actor.link records themselves remain in the repo but are no longer referenced by the profile.
In UpdateProfileRecord.swift, the existing values are copied for every other field (lines 69–77), but links is not, and the ProfileRecord initializer is called without it, so it falls back to its default of nil (lines 189–200):
let profileRecord = AppBskyLexicon.Actor.ProfileRecord(
displayName: newDisplayName,
description: newDescription,
pronouns: newPronouns,
websiteURL: newWebsiteURL,
avatarBlob: newAvatarImage,
bannerBlob: newBannerImage,
labels: newLabels,
joinedViaStarterPack: newJoinedViaStarterPack,
pinnedPost: newPinnedPost,
createdAt: Date()
)
Because putRecord replaces the whole record, the omitted field is deleted.
- 主要言語
- Swift
- スター
- 226
- フォーク
- 40
- 平均マージ
- 5時間 8分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MasterJ93/ATProtoKit のほかの issue
-
enhancement
難易度 4/5 1〜2日 初心者へのやさしさ 52/100
MasterJ93/ATProtoKit#337 · コメント 3 件 ·
-
new feature
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
MasterJ93/ATProtoKit#321 · コメント 1 件 ·
-
new feature
難易度 4/5 3〜5日 初心者へのやさしさ 43/100
MasterJ93/ATProtoKit#320 · コメント 1 件 ·
-
new feature
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
MasterJ93/ATProtoKit#316 · コメント 1 件 ·
-
new feature
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
MasterJ93/ATProtoKit#216 · コメント 1 件 ·
MasterJ93/ATProtoKit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
abue-ammar/tinycast#1851 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:ui good first issue priority:p2 type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
area: build-and-ci possible-duplicate S3: minor
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
manaflow-ai/cmux#38889 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
agent-ready area:skills
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
jmbarzee/temporal-architect#616 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
LibChecker/LibChecker-Rules#1453 ·