add a few common used on_event handlers #6

Merged
sarah merged 6 commits from on_handlers into main 2022-07-22 16:39:32 +00:00
1 changed files with 4 additions and 4 deletions
Showing only changes of commit f9a9a6bad2 - Show all commits

View File

@ -168,10 +168,10 @@ impl Imp {
let acl: ACL = serde_json::from_str(&data["accessControlList"]).expect("Error parsing conversation");
let conversatio_id: i32 = data["ConversationID"].parse::<i32>().unwrap();
let conversation_id: i32 = data["ConversationID"].parse::<i32>().unwrap();
let conversation = Conversation {
handle: convo_handle.clone(),
identifier: conversatio_id,
identifier: conversation_id,
name: data["nick"].to_string(),
status: ConnectionState::new(&data["status"]),
blocked: data["blocked"] == "true",
@ -187,8 +187,8 @@ impl Imp {
profile
.conversations
.insert(conversation.identifier, conversation);
handler.on_new_contact(self.cwtch.as_ref(), profile, conversatio_id);
handler.on_contact_online(self.cwtch.as_ref(), profile, conversatio_id);
handler.on_new_contact(self.cwtch.as_ref(), profile, conversation_id);
handler.on_contact_online(self.cwtch.as_ref(), profile, conversation_id);
}
None => (),
};