Skip to content

Allow generated clips in groups that allow drawing - #300

Merged
iamwavecut merged 1 commit into
mainfrom
fix/video-in-groups
Nov 19, 2026
Merged

iamwavecut merged 1 commit into
mainfrom
fix/video-in-groups

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

Problem

make_video works in private chats but refuses in groups with video_not_allowed, even where the bot can draw. can_perform_action had no rule for send_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 = true got video_not_allowed from the tool; the same request in a private chat was delivered.

Change

  • send_video follows enable_global_draw_reply, like images, stickers and audio.
  • ChatPermissionPolicy::invalidate_chat also drops the cached send_video decision.

Tests

  • can_perform_action_matches_go_chat_settings_policy: a draw-enabled group allows video; a fully disabled group refuses it.
  • New 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.

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.
@github-actions

Copy link
Copy Markdown
Messages
📖 Danger checked 2 changed file(s).

Generated by 🚫 dangerJS against 24f9420

@iamwavecut
iamwavecut merged commit 13dbb2a into main Nov 19, 2026
11 of 12 checks passed
@iamwavecut
iamwavecut deleted the fix/video-in-groups branch November 19, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant