Commit 96f6767 1 parent 4d46176 commit 96f6767 Copy full SHA for 96f6767
File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,9 @@ public function handle(Posted $event): void
38
38
}
39
39
}
40
40
41
- $ actor ->assertCan ('discussion.useChatGPTAssistant ' , $ discussion );
42
-
41
+ if ($ actor ->can ('discussion.useChatGPTAssistant ' , $ discussion ) === false ) {
42
+ return ;
43
+ }
43
44
44
45
if (!$ enabled ) {
45
46
$ this ->agent ->repliesToCommentPost ($ event ->post );
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ public function handle(Started $event): void
38
38
}
39
39
}
40
40
41
- $ actor ->assertCan ('discussion.useChatGPTAssistant ' , $ discussion );
41
+ if ($ actor ->can ('discussion.useChatGPTAssistant ' , $ discussion ) === false ) {
42
+ return ;
43
+ }
42
44
43
45
if (!$ enabled ) {
44
46
$ this ->agent ->repliesTo ($ event ->discussion );
You can’t perform that action at this time.
0 commit comments