From a974c393dfafb7d6634ce61ca6a3153953a1e9eb Mon Sep 17 00:00:00 2001 From: Alexander Emelin Date: Mon, 13 Dec 2021 16:26:29 +0300 Subject: [PATCH] fix history result offset field, prepare 4.1.0 --- CHANGELOG.md | 5 +++++ cent/core.py | 2 +- setup.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1363a8..f30b643 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +v4.1.0 +====== + +* Fix `offset` field in history result which previously contained `publications`, [#24](https://github.com/centrifugal/cent/issues/24). + v4.0.1 ====== diff --git a/cent/core.py b/cent/core.py index 7ebde12..5df8e2b 100644 --- a/cent/core.py +++ b/cent/core.py @@ -261,7 +261,7 @@ def history(self, channel, limit=0, since=None, reverse=False): result = self._send_one() return { "publications": result.get("publications", []), - "offset": result.get("publications", 0), + "offset": result.get("offset", 0), "epoch": result.get("epoch", ""), } diff --git a/setup.py b/setup.py index b732a65..4798733 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ def long_description(): setup( name='cent', - version='4.0.1', + version='4.1.0', description="Python library to communicate with Centrifugo v3 HTTP API", long_description=long_description(), url='https://github.com/centrifugal/cent',