diff --git a/lib/discourse_chat/provider/slack/slack_command_controller.rb b/lib/discourse_chat/provider/slack/slack_command_controller.rb index edecda7..4fc905a 100644 --- a/lib/discourse_chat/provider/slack/slack_command_controller.rb +++ b/lib/discourse_chat/provider/slack/slack_command_controller.rb @@ -28,6 +28,8 @@ module DiscourseChat::Provider::SlackProvider case params[:channel_name] when 'directmessage' "@#{params[:user_name]}" + when 'privategroup' + params[:channel_id] else "##{params[:channel_name]}" end diff --git a/lib/discourse_chat/provider/slack/slack_provider.rb b/lib/discourse_chat/provider/slack/slack_provider.rb index 419e4dd..82f5f5a 100644 --- a/lib/discourse_chat/provider/slack/slack_provider.rb +++ b/lib/discourse_chat/provider/slack/slack_provider.rb @@ -6,7 +6,7 @@ module DiscourseChat::Provider::SlackProvider PROVIDER_ENABLED_SETTING = :chat_integration_slack_enabled CHANNEL_PARAMETERS = [ - { key: "identifier", regex: '^[@#]\S*$', unique: true } + { key: "identifier", regex: '^[@#]?\S*$', unique: true } ] def self.excerpt(post, max_length = SiteSetting.chat_integration_slack_excerpt_length)