Only check channel uniqueness within the same provider

This commit is contained in:
David Taylor 2017-08-23 16:31:47 +01:00
parent 9b229b63f9
commit 4703250c1f
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class DiscourseChat::Channel < DiscourseChat::PluginModel
end
check_unique = false
matching_channels = DiscourseChat::Channel.where.not(id: id)
matching_channels = DiscourseChat::Channel.with_provider(provider).where.not(id: id)
data.each do |key, value|
regex_string = params.find { |p| p[:key] == key }[:regex]