diff options
Diffstat (limited to 'app/models/projects')
-rw-r--r-- | app/models/projects/topic.rb | 2 | ||||
-rw-r--r-- | app/models/projects/triggered_hooks.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/models/projects/topic.rb b/app/models/projects/topic.rb index ed1795b43e0..347d65841ed 100644 --- a/app/models/projects/topic.rb +++ b/app/models/projects/topic.rb @@ -71,7 +71,7 @@ module Projects # /\R/ - A linebreak: \n, \v, \f, \r \u0085 (NEXT LINE), # \u2028 (LINE SEPARATOR), \u2029 (PARAGRAPH SEPARATOR) or \r\n. - return unless name =~ /\R/ + return unless /\R/.match?(name) errors.add(:name, 'has characters that are not allowed') end diff --git a/app/models/projects/triggered_hooks.rb b/app/models/projects/triggered_hooks.rb index e3aa3d106b7..1f51ced5b57 100644 --- a/app/models/projects/triggered_hooks.rb +++ b/app/models/projects/triggered_hooks.rb @@ -17,6 +17,8 @@ module Projects # Assumes that the relations implement TriggerableHooks @relations.each do |hooks| hooks.hooks_for(@scope).select_active(@scope, @data).each do |hook| + next if @scope == :emoji_hooks && Feature.disabled?(:emoji_webhooks, hook.parent) + hook.async_execute(@data, @scope.to_s) end end |