Skip to content

Commit

Permalink
Simplify slack channel regexp and allow private (no # prefix) channel…
Browse files Browse the repository at this point in the history
…s and direct messages (@ prefix) (#6699)
  • Loading branch information
smb authored and snipe committed Feb 8, 2019
1 parent 4fd469e commit 3530603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Setting extends Model
'default_currency' => 'required',
'locale' => 'required',
'slack_endpoint' => 'url|required_with:slack_channel|nullable',
'slack_channel' => 'regex:/(?<!\w)#\w+/|required_with:slack_endpoint|nullable',
'slack_channel' => 'regex:/^[\#\@]?\w+/|required_with:slack_endpoint|nullable',
'slack_botname' => 'string|nullable',
'labels_per_page' => 'numeric',
'labels_width' => 'numeric',
Expand Down

0 comments on commit 3530603

Please sign in to comment.