remove all member_added/remove_events

This commit is contained in:
holger krekel
2020-04-19 21:13:08 +02:00
parent 02cda1e611
commit 70c082a1b1
7 changed files with 7 additions and 91 deletions

View File

@@ -1795,7 +1795,6 @@ pub fn create_group_chat(
}
/// add a contact to the chats_contact table
/// on success emit MemberAdded event and return true
pub(crate) fn add_to_chat_contacts_table(
context: &Context,
chat_id: ChatId,
@@ -1807,14 +1806,7 @@ pub(crate) fn add_to_chat_contacts_table(
"INSERT INTO chats_contacts (chat_id, contact_id) VALUES(?, ?)",
params![chat_id, contact_id as i32],
) {
Ok(()) => {
context.call_cb(Event::MemberAdded {
chat_id,
contact_id,
});
true
}
Ok(()) => true,
Err(err) => {
error!(
context,
@@ -1827,7 +1819,6 @@ pub(crate) fn add_to_chat_contacts_table(
}
/// remove a contact from the chats_contact table
/// on success emit MemberRemoved event and return true
pub(crate) fn remove_from_chat_contacts_table(
context: &Context,
chat_id: ChatId,
@@ -1839,14 +1830,7 @@ pub(crate) fn remove_from_chat_contacts_table(
"DELETE FROM chats_contacts WHERE chat_id=? AND contact_id=?",
params![chat_id, contact_id as i32],
) {
Ok(()) => {
context.call_cb(Event::MemberRemoved {
chat_id,
contact_id,
});
true
}
Ok(()) => true,
Err(_) => {
warn!(
context,