mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add topic voting webhook event type (#23072)
* FEATURE: add topic upvote webhook event type * DEV: use a generic event type name for other actions in the same plugin
This commit is contained in:
@@ -15,6 +15,7 @@ class WebHookEventType < ActiveRecord::Base
|
||||
GROUP_USER = 14
|
||||
LIKE = 15
|
||||
USER_PROMOTED = 16
|
||||
TOPIC_VOTING = 17
|
||||
|
||||
has_and_belongs_to_many :web_hooks
|
||||
|
||||
@@ -30,6 +31,9 @@ class WebHookEventType < ActiveRecord::Base
|
||||
unless defined?(SiteSetting.assign_enabled) && SiteSetting.assign_enabled
|
||||
ids_to_exclude << ASSIGN
|
||||
end
|
||||
unless defined?(SiteSetting.voting_enabled) && SiteSetting.voting_enabled
|
||||
ids_to_exclude << TOPIC_VOTING
|
||||
end
|
||||
|
||||
self.where.not(id: ids_to_exclude)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user