File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ use serde_json::Value;
3434use sha2:: { Digest , Sha256 } ;
3535use tokio:: { fs:: File , io:: BufReader } ;
3636
37- use crate :: chat:: { self , Chat } ;
37+ use crate :: chat:: { self , CantSendReason , Chat } ;
3838use crate :: constants:: Chattype ;
3939use crate :: contact:: ContactId ;
4040use crate :: context:: Context ;
@@ -542,9 +542,18 @@ impl Context {
542542 let chat = Chat :: load_from_db ( self , chat_id)
543543 . await
544544 . with_context ( || format ! ( "Failed to load chat {chat_id} from the database" ) ) ?;
545- if let Some ( reason) = chat. why_cant_send ( self ) . await . with_context ( || {
546- format ! ( "Failed to check if webxdc update can be sent to chat {chat_id}" )
547- } ) ? {
545+
546+ let skip_fn = |reason : & CantSendReason | match reason {
547+ CantSendReason :: InBroadcast => true ,
548+ _ => false ,
549+ } ;
550+ if let Some ( reason) = chat
551+ . why_cant_send_ex ( self , & skip_fn)
552+ . await
553+ . with_context ( || {
554+ format ! ( "Failed to check if webxdc update can be sent to chat {chat_id}" )
555+ } ) ?
556+ {
548557 bail ! ( "Cannot send to {chat_id}: {reason}." ) ;
549558 }
550559
You can’t perform that action at this time.
0 commit comments