Skip to content

Commit d907dd6

Browse files
committed
Fix: scopes are comma-separated.
1 parent 375032a commit d907dd6

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* [#158](https://github.com/slack-ruby/slack-ruby-bot-server/pull/158): Replace `cursor_pagination` with `pagy_cursor` - [@crazyoptimist](https://github.com/crazyoptimist).
1111
* [#160](https://github.com/slack-ruby/slack-ruby-bot-server/pull/160): Document upgrading to 2.0.0 - [@crazyoptimist](https://github.com/crazyoptimist).
1212
* [#161](https://github.com/slack-ruby/slack-ruby-bot-server/pull/161): Removed unused `ext` module - [@dblock](https://github.com/dblock).
13+
* [#162](https://github.com/slack-ruby/slack-ruby-bot-server/pull/162): Fix: scopes are comma-separated - [@dblock](https://github.com/dblock).
1314
* Your contribution here.
1415

1516
#### 1.2.1 (2022/03/06)

lib/slack-ruby-bot-server/config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def oauth_access_method
5353
end
5454

5555
def oauth_scope_s
56-
oauth_scope&.join('+')
56+
oauth_scope&.join(',')
5757
end
5858

5959
def activerecord?

spec/integration/teams_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
end
3939
it 'includes a link to add to slack with the client id' do
4040
expect(title).to eq('Slack Ruby Bot Server')
41-
expect(find("a[href='https://slack.com/oauth/authorize?scope=channels:read+channels:write&client_id=client_id"))
41+
expect(find("a[href='https://slack.com/oauth/authorize?scope=channels:read,channels:write&client_id=client_id"))
4242
end
4343
end
4444
end
@@ -68,7 +68,7 @@
6868
end
6969
it 'includes a link to add to slack with the client id' do
7070
expect(title).to eq('Slack Ruby Bot Server')
71-
expect(find("a[href='https://slack.com/oauth/v2/authorize?scope=channels:read+channels:write&client_id=client_id"))
71+
expect(find("a[href='https://slack.com/oauth/v2/authorize?scope=channels:read,channels:write&client_id=client_id"))
7272
end
7373
end
7474
end

0 commit comments

Comments
 (0)