编辑:我想我弄错了。看起来我正在寻找类型 1 和 2。类型 2 会在用户回复时触发。这使得此帖子基本无关紧要。在玩这个的时候,我脑子里冒出了一个问题:
mentioned 清晰明了,当有明确的 @提及时,类型 == 1。
但对于 replied,我有点困惑。
当我通过通用按钮之一回复主题时,它会作为回复出现。这很合理。
但如果你点击回复特定用户帖子的回复按钮,你会认为这是一个提及,但它仍然是类型 2 通知。

“回复用户”通知不应该获得类型 1 吗?因为它基本上与提及完全相同,只是帖子中没有 @提及。
供参考,因为在元(meta)上别处没有,所以在此处发布通知类型。也许这些类型的通知可以获得一个新类型,或者只是类型 1?
[1] pry(main)> Notification.types
=> {:mentioned =>1,
:replied =>2,
:quoted =>3,
:edited =>4,
:liked =>5,
:private_message =>6,
:invited_to_private_message =>7,
:invitee_accepted =>8,
:posted =>9,
:moved_post =>10,
:linked =>11,
:granted_badge =>12,
:invited_to_topic =>13,
:custom =>14,
:group_mentioned =>15,
:group_message_summary =>16,
:watching_first_post =>17,
:topic_reminder =>18,
:liked_consolidated =>19,
:post_approved =>20,
:code_review_commit_approved =>21,
:membership_request_accepted =>22,
:membership_request_consolidated =>23,
:bookmark_reminder =>24,
:reaction =>25,
:votes_released =>26,
:event_reminder =>27,
:event_invitation =>28,
:chat_mention =>29,
:chat_message =>30,
:chat_invitation =>31,
:chat_group_mention =>32,
:chat_quoted =>33,
:assigned =>34,
:question_answer_user_commented =>35,
:watching_category_or_tag =>36}