Skip to content

チャット(DM)のプッシュ通知をクリックすると、相手ではなく自分自身の DM ページが開く #18118

Closed

Description

@tamaina

💡 Summary

チャット(1対1のDM)のプッシュ通知をクリックすると、メッセージを送ってきた相手とのチャットではなく、自分自身宛ての DM ページ(/chat/user/<自分のユーザーID>)が開いてしまいます。

🥰 Expected Behavior

通知をクリックすると、メッセージの送信者とのチャット(/chat/user/<送信者のユーザーID>)が開く。

🤬 Actual Behavior

自分自身とのチャットページ(/chat/user/<自分のユーザーID>)が開く。

📝 Steps to Reproduce

  1. ユーザーA でプッシュ通知を有効にする
  2. ユーザーB からユーザーA へチャット(DM)を送る
  3. ユーザーA に届いたプッシュ通知をクリックする
  4. 送信者B ではなく、A 自身との DM ページが開く

原因

packages/sw/src/scripts/operations.ts の openChat() が、ユーザー間チャットの場合に body.toUserId(=受信者である自分)を使って /chat/user/${body.toUserId} を開いているためです。body.fromUserId を使うべきだと考えられます(通知の tag を生成する create-notification.ts では既に fromUserId が使われています)。ルームチャット(toRoomId)の場合は問題ありません。

#15831 (2025.4.1) で導入されたようです。

💻 Frontend Environment

* Model and OS of the device(s): 問わず
* Browser: 問わず(Service Worker のプッシュ通知を使用するブラウザ)
* Server URL: 特定のサーバーに依存しません
* Misskey: develop (2026.11.0-alpha.0)

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service: 問わず
* Misskey: develop (2026.11.0-alpha.0)

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request

Activity

  1. added a commit that references this issue on Nov 8, 2026
  2. added a commit that references this issue on Nov 12, 2026
    ae723a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions