Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): アバターとバナーがリセットできない #10643

Merged
merged 5 commits into from
Apr 16, 2023

Conversation

Nanashia
Copy link
Contributor

@Nanashia Nanashia commented Apr 15, 2023

What

fixes #10640

Why

521eb95 でアバターとバナーをキャッシュする仕組みが入りましたが、 この変更でi/update{ avatarId: null }{ bannerId: null }を渡した時の挙動が変化してしまっています。

521eb95#diff-ab6f3cefa5fb65f12b3bd83ef1e2cdac0dc7fc5a91ff096ab9736ce75ce0a231L173-L174 ps.avatarIdやps.bannerIdがnullだったときの分岐が考慮されていませんでした。

なお、この挙動の変化は #10546 を書いているときに発見したもので、一時的に該当のテストを無効化していましたがこのPRでフタ開けしています。

Additional info (optional)

  • jestがgreenになる事
  • devサーバーを立ち上げてプロファイル変更画面で
    • アバターをアップロード&設定できること
    • バナーをアップロード&設定できること
    • DevTool(Firefox)から i/update に直接クエリを投げて { avatarId: null }{ bannerId: null } を渡すとそれぞれリセットされること(アバター、バナーが初期状態に戻る事)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/backend Server side specific issue/PR 🧪Test labels Apr 15, 2023
@codecov
Copy link

codecov bot commented Apr 15, 2023

Codecov Report

Merging #10643 (d530ed4) into develop (d2aba9b) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #10643      +/-   ##
===========================================
- Coverage    76.07%   76.07%   -0.01%     
===========================================
  Files          897      897              
  Lines        88606    88614       +8     
  Branches      6252     6253       +1     
===========================================
+ Hits         67411    67417       +6     
- Misses       21195    21197       +2     
Impacted Files Coverage Δ
...kages/backend/src/server/api/endpoints/i/update.ts 94.28% <100.00%> (+0.14%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Nanashia Nanashia marked this pull request as ready for review April 15, 2023 11:23
@github-actions github-actions bot requested review from syuilo and tamaina April 15, 2023 11:25
@syuilo syuilo merged commit 0ddc79b into misskey-dev:develop Apr 16, 2023
@syuilo
Copy link
Member

syuilo commented Apr 16, 2023

🙏🏻

na2na-p pushed a commit to na2na-p/misskey that referenced this pull request May 10, 2023
* fix(backend): avatar and banner couldn't be reset

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

アバターとバナーがリセットできない( 521eb95 でi/updateの挙動が変わっている)
2 participants