1.16.0
What's Changed
Update with pip:
pip3 install -U pywa
- [chat_opened] adding a new type:
ChatOpened
- [server] improve handlers and logs
- [types] warning on missing enum constant
- [flows] handle cases where there is no
flow_token
inFlowCompletion
(When the flow completion sent from iOS) - [tests] adding more tests
from pywa import WhatsApp
from pywa.types import ChatOpened
from flask import Flask
flask_app = Flask(__name__)
wa = WhatsApp(..., server=flask_app, verify_token=...)
@wa.on_chat_opened()
def handle_chat_opened(_: WhatsApp, chat_opened: ChatOpened):
chat_opened.reply(f"Hello, {chat_opened.from_user.name}. Welcome to our bot!")
Full Changelog: 1.15.0...1.16.0