Skip to content

Add verification methods for WhatsApp #164

@gochujang-c

Description

@gochujang-c

After adding verification the framework, expand WhatsApp with some example verification methods. These methods need to be added, and documentation needs to be expanded, showing users how these can be used.
 
Verification methods we want:

  • check if a sent message is actually sent/received/read
  • check if a message is received (so look at all incoming messages in a thread and check if the required one is there)
  • check if a call connects after answering
  • after creating a group, check if all the members were added.

These methods should return a boolean (or perhaps a string/enum describing the call state, for the second example) so the methods can be used by themselves, but they should also log an info or error to the default logger if the verification passes/fails.
 
The methods for the verification framework can be loose static  methods, but for these 3 examples it's better when they are stateful methods on the WhatsApp class. This enables the following code:

this method sends a message from alice to bob, and then we check on alice's side whether it was sent:
message = "Hoi Bob"
alice.send_message(message, verification=alice.check_message_is_sent(message))
this method sends a message from bob to alice, and checks on alice's side whether the message was received:
message = "Hi alice'
bob.send_message(msg=message, verification=alice.check_message_is_received(message))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions