Category Experts Webhook event WIP

This commit is contained in:
Guhyoun Nam 2024-08-23 12:24:23 +09:00
parent 1ac7482271
commit 584ec9ee5f
No known key found for this signature in database
GPG Key ID: 4E5F7A35021FBFA6
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,7 @@ class WebHookEventType < ActiveRecord::Base
USER_PROMOTED = 16
TOPIC_VOTING = 17
CHAT_MESSAGE = 18
CATEGORY_EXPERT = 19
enum group: {
topic: 0,
@ -35,6 +36,7 @@ class WebHookEventType < ActiveRecord::Base
user_promoted: 13,
voting: 14,
chat: 15,
category_expert: 16,
},
_scopes: false
@ -85,6 +87,7 @@ class WebHookEventType < ActiveRecord::Base
chat_message_edited: 1802,
chat_message_trashed: 1803,
chat_message_restored: 1804,
category_expert_approved: 1901,
}
has_and_belongs_to_many :web_hooks
@ -116,6 +119,9 @@ class WebHookEventType < ActiveRecord::Base
],
)
end
# unless defined?(SiteSetting.enable_category_experts) && SiteSetting.enable_category_experts
# ids_to_exclude.concat([TYPES[:category_expert_approved]])
# end
self.where.not(id: ids_to_exclude)
end
end