refine member-added and member-removed plugin hooks to signal the sender (who added/removed a contact )

add ac_chat_modified hook event
add account.get_contact_by_addr (thanks @r10s)
This commit is contained in:
holger krekel
2020-04-17 21:32:27 +02:00
parent a87a2d0b71
commit 9eda710538
7 changed files with 133 additions and 76 deletions

View File

@@ -43,14 +43,14 @@ def test_group_tracking_plugin(acfactory, lp):
ac1.add_account_plugin(FFIEventLogger(ac1, "ac1"))
ac2.add_account_plugin(FFIEventLogger(ac2, "ac2"))
lp.sec("creating bot test group with all three")
lp.sec("creating bot test group with bot")
bot_contact = ac1.create_contact(botproc.addr)
ch = ac1.create_group_chat("bot test group")
ch.add_contact(bot_contact)
ch.send_text("hello")
botproc.fnmatch_lines("""
*ac_member_added {}*
*ac_chat_modified*
""".format(ac1.get_config("addr")))
lp.sec("adding third member {}".format(ac2.get_config("addr")))