mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 13:17:08 +00:00
Merge branch 'hs/fix-github-grants-failing-2' into hs/hotfix-2
This commit is contained in:
commit
bd2bad495e
1
changelog.d/672.bugfix
Normal file
1
changelog.d/672.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix GitHub repo connections not always applying state updates.
|
@ -568,14 +568,14 @@ export class GitHubRepoConnection extends CommandConnection<GitHubRepoConnection
|
||||
return this.state.priority || super.priority;
|
||||
}
|
||||
|
||||
public async ensureGrant(sender?: string, state = this.state) {
|
||||
public async ensureGrant(sender?: string, state = { org: this.org, repo: this.repo }) {
|
||||
await this.grantChecker.assertConnectionGranted(this.roomId, state, sender);
|
||||
}
|
||||
|
||||
protected async validateConnectionState(content: unknown) {
|
||||
const state = GitHubRepoConnection.validateState(content);
|
||||
// Validate the permissions of this state
|
||||
await this.ensureGrant(undefined, state);
|
||||
await this.ensureGrant(undefined, { org: this.org, repo: this.repo });
|
||||
return state;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user