Skip to content

Commit c352a44

Browse files
committed
refactor: rename notify_peer_verified() into set_peer_verified()
It was named notify_peer_verified() because it added info message, but this is no longer true since #4998 (commit c6ea4e3) is merged.
1 parent acb4830 commit c352a44

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/securejoin/bob.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub(super) async fn handle_auth_required(
101101
chat::add_info_msg(context, chat_id, &msg, time()).await?;
102102
}
103103
bobstate
104-
.notify_peer_verified(context, message.timestamp_sent)
104+
.set_peer_verified(context, message.timestamp_sent)
105105
.await?;
106106
bobstate.emit_progress(context, JoinerProgress::RequestWithAuthSent);
107107
Ok(HandshakeMessage::Done)
@@ -182,14 +182,8 @@ impl BobState {
182182
Ok(())
183183
}
184184

185-
/// Notifies the user that the SecureJoin peer is verified.
186-
///
187-
/// This creates an info message in the chat being joined.
188-
pub(crate) async fn notify_peer_verified(
189-
&self,
190-
context: &Context,
191-
timestamp: i64,
192-
) -> Result<()> {
185+
/// Turns 1:1 chat with SecureJoin peer into protected chat.
186+
pub(crate) async fn set_peer_verified(&self, context: &Context, timestamp: i64) -> Result<()> {
193187
let contact = Contact::get_by_id(context, self.invite().contact_id()).await?;
194188
self.alice_chat()
195189
.set_protection(

src/securejoin/bobstate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl BobState {
121121

122122
if peer_verified {
123123
// Mark 1:1 chat as verified already.
124-
state.notify_peer_verified(context, time()).await?;
124+
state.set_peer_verified(context, time()).await?;
125125
}
126126

127127
Ok((state, stage, aborted_states))

0 commit comments

Comments
 (0)