Repository navigation
Allow generated clips in groups that allow drawing - #300
Merged
Merged
Conversation
The chat permission policy had no rule for send_video, so every group with a settings row refused make_video with video_not_allowed, while private chats worked. Clips now follow the same group setting as images, stickers and audio, and invalidating a chat also drops the cached video decision.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
make_videoworks in private chats but refuses in groups withvideo_not_allowed, even where the bot can draw.can_perform_actionhad no rule forsend_video, so for any non-private chat with a settings row it fell through to_ => false. The same check gates delivery in the video worker.Prod evidence: a supergroup with
enable_global_draw_reply = truegotvideo_not_allowedfrom the tool; the same request in a private chat was delivered.Change
send_videofollowsenable_global_draw_reply, like images, stickers and audio.ChatPermissionPolicy::invalidate_chatalso drops the cachedsend_videodecision.Tests
can_perform_action_matches_go_chat_settings_policy: a draw-enabled group allows video; a fully disabled group refuses it.video_follows_the_group_draw_setting_and_invalidates_with_it: policy level, including cache invalidation.cargo fmt --all,cargo clippy --workspace --all-targets -- -D warnings,cargo test -p openplotva-app --lib -- permissions video(35 passed),cargo test -p openplotva-server can_perform_action.