@@ -1658,11 +1658,6 @@ impl Chat {
16581658 self . typ == Chattype :: Mailinglist
16591659 }
16601660
1661- /// Returns true if chat is an outgoing broadcast channel.
1662- pub fn is_out_broadcast ( & self ) -> bool {
1663- self . typ == Chattype :: OutBroadcast
1664- }
1665-
16661661 /// Returns None if user can send messages to this chat.
16671662 ///
16681663 /// Otherwise returns a reason useful for logging.
@@ -4095,7 +4090,7 @@ pub(crate) async fn add_contact_to_chat_ex(
40954090 msg. viewtype = Viewtype :: Text ;
40964091
40974092 let contact_addr = contact. get_addr ( ) . to_lowercase ( ) ;
4098- let added_by = if from_handshake && chat. is_out_broadcast ( ) {
4093+ let added_by = if from_handshake && chat. typ == Chattype :: OutBroadcast {
40994094 // The contact was added via a QR code rather than explicit user action,
41004095 // and there is no useful information in saying 'You added member Alice'
41014096 // if self is the only one who can add members.
@@ -4109,7 +4104,7 @@ pub(crate) async fn add_contact_to_chat_ex(
41094104 msg. param . set_int ( Param :: Arg2 , from_handshake. into ( ) ) ;
41104105 msg. param
41114106 . set_int ( Param :: ContactAddedRemoved , contact. id . to_u32 ( ) as i32 ) ;
4112- if chat. is_out_broadcast ( ) {
4107+ if chat. typ == Chattype :: OutBroadcast {
41134108 let secret = load_broadcast_shared_secret ( context, chat_id)
41144109 . await ?
41154110 . context ( "Failed to find broadcast shared secret" ) ?;
0 commit comments