diff --git a/CHANGELOG.md b/CHANGELOG.md index e6ec694c4b..2e65edc1c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,15 @@ # Changelog All notable changes to this project will be documented in this file. -Given the high speed of development in the first phase, changes are being reported only starting from v0.20.2. +Given the high speed of development in the first phase, changes are being +reported only starting from v0.20.2. + +## [Unreleased] + +### Added + +- Added support for web hooks returning their hook method responses back to the + HTTP client. ## [0.23.4] - 2022-08-28 diff --git a/platypush/message/event/http/hook.py b/platypush/message/event/http/hook.py index 1c1690d910..728a13c577 100644 --- a/platypush/message/event/http/hook.py +++ b/platypush/message/event/http/hook.py @@ -64,7 +64,9 @@ class WebhookEvent(Event): get_redis().rpush(self.args['response_queue'], output) def wait_response(self, timeout=None): - return get_redis().blpop(self.args['response_queue'], timeout=timeout)[1] + rs = get_redis().blpop(self.args['response_queue'], timeout=timeout) + if rs and len(rs) > 1: + return rs[1] # vim:sw=4:ts=4:et: