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
https://github.com/deltachat/deltachat-core-rust/pull/4998
(commit c6ea4e389a)
is merged.
This commit is contained in:
link2xt
2024-01-09 03:09:03 +00:00
parent acb4830a54
commit c352a4478f
2 changed files with 4 additions and 10 deletions

View File

@@ -101,7 +101,7 @@ pub(super) async fn handle_auth_required(
chat::add_info_msg(context, chat_id, &msg, time()).await?; chat::add_info_msg(context, chat_id, &msg, time()).await?;
} }
bobstate bobstate
.notify_peer_verified(context, message.timestamp_sent) .set_peer_verified(context, message.timestamp_sent)
.await?; .await?;
bobstate.emit_progress(context, JoinerProgress::RequestWithAuthSent); bobstate.emit_progress(context, JoinerProgress::RequestWithAuthSent);
Ok(HandshakeMessage::Done) Ok(HandshakeMessage::Done)
@@ -182,14 +182,8 @@ impl BobState {
Ok(()) Ok(())
} }
/// Notifies the user that the SecureJoin peer is verified. /// Turns 1:1 chat with SecureJoin peer into protected chat.
/// pub(crate) async fn set_peer_verified(&self, context: &Context, timestamp: i64) -> Result<()> {
/// This creates an info message in the chat being joined.
pub(crate) async fn notify_peer_verified(
&self,
context: &Context,
timestamp: i64,
) -> Result<()> {
let contact = Contact::get_by_id(context, self.invite().contact_id()).await?; let contact = Contact::get_by_id(context, self.invite().contact_id()).await?;
self.alice_chat() self.alice_chat()
.set_protection( .set_protection(

View File

@@ -121,7 +121,7 @@ impl BobState {
if peer_verified { if peer_verified {
// Mark 1:1 chat as verified already. // Mark 1:1 chat as verified already.
state.notify_peer_verified(context, time()).await?; state.set_peer_verified(context, time()).await?;
} }
Ok((state, stage, aborted_states)) Ok((state, stage, aborted_states))