Python > 멘션된 경우 게시물 내용 가져오기

수정: 제가 오해한 것 같습니다. 제가 찾는 것은 1번과 2번 유형인 것 같습니다. 2번 유형은 사용자에게 답장이 있을 경우 트리거됩니다. 이로 인해 이 게시물은 사실상 무의미해집니다. 이것을 시험해 보다가 다음과 같은 질문이 떠올랐습니다:

mentioned는 명확합니다. 명시적인 @Mention이 있을 경우 type == 1입니다.

하지만 replied의 경우 조금 혼란스럽습니다.

일반 버튼 중 하나를 통해 토픽에 답장하면 답장으로 입력됩니다. 이는 당연합니다.

하지만 특정 사용자의 게시물에 대한 답장 버튼을 클릭하면 언급(mention)일 것이라고 생각하지만, 여전히 2번 유형 알림입니다.

This should be a mention type notification

“사용자에게 답장” 알림은 1번 유형이 되어야 하지 않나요? 이는 게시물에 @Mention이 없을 뿐, 언급과 기본적으로 정확히 동일한 것이기 때문입니다.

참고로, 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}