diff --git a/CHANGELOG.md b/CHANGELOG.md index b317bf9e..5e6eb5eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Changelog NOTE: pywa follows the [semver](https://semver.org/) versioning standard. +### 1.13.0-rc.3 (2023-12-15) + +- [errors] adding flows specific errors +- [flows] allow to `@on_flow_request` callbacks to return or raise `FlowResponseError` subclasses + ### 1.13.0-rc.2 (2023-12-14) - [base_update] adding `.raw` attr to hold the original update diff --git a/docs/source/content/flows/overview.rst b/docs/source/content/flows/overview.rst index 7b0353b4..e9f12b9b 100644 --- a/docs/source/content/flows/overview.rst +++ b/docs/source/content/flows/overview.rst @@ -10,7 +10,7 @@ The ``Flows`` in pywa are still in beta and not fully tested. Install the RC version of pywa to use it: - >>> pip3 install "pywa[cryptography]==1.13.0rc2" + >>> pip3 install "pywa[cryptography]==1.13.0rc3" The ``cryptography`` extra is required for the default implementation of the decryption and encryption of the flow requests and responses. @@ -815,6 +815,9 @@ We need to provide our business private key to decrypt the request and encrypt t After that. we are registering a callback function to handle the request. The callback function will receive the :class:`FlowRequest` object and should return :class:`FlowResponse` object. + A callback function can be return or raise :class:`FlowTokenNoLongerValid` or :class:`FlowRequestSignatureAuthenticationFailed` + to indicate that the flow token is no longer valid or the request signature authentication failed. + In our example, we returning our dynamic data to the ``DETAILS`` screen. Of course, it can be more complex, if you have multiple screens, you can return data from them and then decide diff --git a/pywa/__init__.py b/pywa/__init__.py index 8f347c92..f2a8144b 100644 --- a/pywa/__init__.py +++ b/pywa/__init__.py @@ -7,6 +7,6 @@ from pywa.client import WhatsApp -__version__ = "1.13.0-rc.2" +__version__ = "1.13.0-rc.3" __author__ = "David Lev" __license__ = "MIT"