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

ブロック時においてフォローリクエストのキャンセル処理で一件のみ処理される #15600

Open
1 task done
ikasoba opened this issue Mar 5, 2025 · 0 comments
Labels
⚠️bug? This might be a bug

Comments

@ikasoba
Copy link
Contributor

ikasoba commented Mar 5, 2025

💡 Summary

ブロック時にフォローリクエストのキャンセル処理が行われるようですが複数を考慮しておらず、一件のみ削除される実装となっているようです。

public async block(blocker: MiUser, blockee: MiUser, silent = false) {
await Promise.all([
this.cancelRequest(blocker, blockee, silent),
this.cancelRequest(blockee, blocker, silent),
this.userFollowingService.unfollow(blocker, blockee, silent),
this.userFollowingService.unfollow(blockee, blocker, silent),

private async cancelRequest(follower: MiUser, followee: MiUser, silent = false) {
const request = await this.followRequestsRepository.findOneBy({
followeeId: followee.id,
followerId: follower.id,
});
if (request == null) {
return;

発信側の実装などの都合によっては適切に解釈してもらえない可能性もあると思われます。

🥰 Expected Behavior

  • 複数件を考慮した実装

🤬 Actual Behavior

  • 一件のみキャンセルされる

📝 Steps to Reproduce

No response

💻 Frontend Environment

* Model and OS of the device(s):
* Browser:
* Server URL:
* Misskey:

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service:
* Misskey: 
* Node:
* PostgreSQL:
* Redis:
* OS and Architecture:

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
@ikasoba ikasoba added the ⚠️bug? This might be a bug label Mar 5, 2025
@ikasoba ikasoba changed the title ブロック時においてフォローリクエストのキャンセル処理が複数件を考慮していない ブロック時においてフォローリクエストのキャンセル処理で一件のみ処理される Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug
Projects
Development

No branches or pull requests

1 participant