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(sw, notification): Don't issue an event if there is no affect #8979

Merged
merged 2 commits into from Jul 13, 2022

Conversation

tamaina
Copy link
Member

@tamaina tamaina commented Jul 10, 2022

Related to #8906 (comment)

What

updateの結果のうちaffectedが0である場合、readNotificationsまたはreadAllNotificationsイベントは発行されないように

Why

#8906 (comment) はバグではなく仕様ではあるが、イベントを毎度送る必要もなさそうなので、affectedが0の場合はイベントを発行しない。

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Jul 10, 2022
@syuilo
Copy link
Member

syuilo commented Jul 10, 2022

affectedってTypeORM+PostgreSQLの組み合わせだと機能しなかった気がしたけど直ったのかな

@tamaina
Copy link
Member Author

tamaina commented Jul 10, 2022

なんか動いてる感じがある

@syuilo
Copy link
Member

syuilo commented Jul 10, 2022

結局直ってるのかどうかよくわからない感じだった
typeorm/typeorm#2415

動いてる感じあるなら大丈夫そう

@syuilo
Copy link
Member

syuilo commented Jul 10, 2022

そもそもだけど readNotifications をSWに送らないでも良さそう

@rinsuki
Copy link
Contributor

rinsuki commented Jul 10, 2022

読んだことにする判定が広すぎて読んだことにされても読んでない通知が消えちゃうのは微妙なことがあるというのはある

バグではなく仕様ではあるが

仕様なの???

@tamaina
Copy link
Member Author

tamaina commented Jul 10, 2022

そもそもだけど readNotifications をSWに送らないでも良さそう

良くないです (好みの問題ではありそう)

読んだことにする判定が広すぎて読んだことにされても読んでない通知が消えちゃうのは微妙なことがあるというのはある

i/notifications叩いただけでread扱いになる仕様は微妙かも

バグではなく仕様ではあるが

仕様なの???

実装当初はaffectedが仕事しなかったのでとりあえずこの仕様になった。サードパーティアプリを考えなければ不具合を引き起きすようなものではないし、私の脳内ではバグという認識だった

@syuilo
Copy link
Member

syuilo commented Jul 12, 2022

meiv23では消えてた
mei23/misskey-v12@c3ee50a

@syuilo syuilo merged commit ae92378 into misskey-dev:develop Jul 13, 2022
@syuilo
Copy link
Member

syuilo commented Jul 13, 2022

🙏🏻

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.

None yet

3 participants