Skip to content

Commit

Permalink
Don't send every DataMessage unsealed (#268)
Browse files Browse the repository at this point in the history
Co-authored-by: Schmiddiii <[email protected]>
  • Loading branch information
direc85 and Schmiddiii authored Dec 12, 2023
1 parent 2e3bd58 commit 38471db
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions libsignal-service/src/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,13 @@ where

let end_session = match &content_body {
ContentBody::DataMessage(message) => {
unidentified_access.take(); // don't send end session as sealed sender
message.flags == Some(Flags::EndSession as u32)
},
_ => false,
};

// we never send sync messages or to our own account as sealed sender
if recipient == &self.local_address
|| matches!(&content_body, ContentBody::SynchronizeMessage(_))
{
// don't send anything to self nor session enders to others as sealed sender
if recipient == &self.local_address || end_session {
unidentified_access.take();
}

Expand Down

0 comments on commit 38471db

Please sign in to comment.