From fc40a572bb851a986e6b500b3b81917c29d4cca7 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Mon, 28 Mar 2022 16:03:19 +0800 Subject: [PATCH] DEV: Register question_answer_user_commented notification type. (#16297) The notification type is used by https://github.com/discourse/discourse-question-answer --- .../discourse/tests/fixtures/concerns/notification-types.js | 1 + app/models/notification.rb | 3 ++- spec/requests/api/schemas/json/site_response.json | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/tests/fixtures/concerns/notification-types.js b/app/assets/javascripts/discourse/tests/fixtures/concerns/notification-types.js index 0817993cf50..a75d7721a16 100644 --- a/app/assets/javascripts/discourse/tests/fixtures/concerns/notification-types.js +++ b/app/assets/javascripts/discourse/tests/fixtures/concerns/notification-types.js @@ -37,4 +37,5 @@ export const NOTIFICATION_TYPES = { chat_group_mention: 32, chat_quoted: 33, assigned: 34, + question_answer_user_commented: 35, }; diff --git a/app/models/notification.rb b/app/models/notification.rb index 48dcb229583..823168a67a5 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -111,7 +111,8 @@ class Notification < ActiveRecord::Base chat_invitation: 31, chat_group_mention: 32, # March 2022 - This is obsolete, as all chat_mentions use `chat_mention` type chat_quoted: 33, - assigned: 34 + assigned: 34, + question_answer_user_commented: 35, # Used by https://github.com/discourse/discourse-question-answer ) end diff --git a/spec/requests/api/schemas/json/site_response.json b/spec/requests/api/schemas/json/site_response.json index f8922a39801..69d5c299772 100644 --- a/spec/requests/api/schemas/json/site_response.json +++ b/spec/requests/api/schemas/json/site_response.json @@ -109,6 +109,9 @@ }, "assigned": { "type": "integer" + }, + "question_answer_user_commented": { + "type": "integer" } }, "required": [