Skip to content

Commit ff2563f

Browse files
Merge pull request #78 from pubnub/develop
Version 4.1.7
2 parents 6bb4477 + d3b0d33 commit ff2563f

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

.pubnub.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: python
2-
version: 4.1.6
2+
version: 4.1.7
33
schema: 1
44
scm: github.com/pubnub/python
55
changelog:
6+
- version: v4.1.7
7+
date: Dec 2, 2019
8+
changes:
9+
- type: improvement
10+
text: Add users join, leave and timeout fields to interval event
611
- version: v4.1.6
712
date: Aug 24, 2019
813
changes:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [4.1.7](https://github.com/pubnub/python/tree/v4.1.7)
2+
3+
[Full Changelog](https://github.com/pubnub/python/compare/v4.1.6...v4.1.7)
4+
5+
- 🌟Add users join, leave and timeout fields to interval event
6+
17
## [4.1.6](https://github.com/pubnub/python/tree/v4.1.6)
28

39
[Full Changelog](https://github.com/pubnub/python/compare/v4.1.5...v4.1.6)

pubnub/models/consumer/pubsub.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class PNSignalMessageResult(PNMessageResult):
3838

3939
class PNPresenceEventResult(object):
4040
def __init__(self, event, uuid, timestamp, occupancy, subscription, channel,
41-
timetoken, state, user_metadata=None):
41+
timetoken, state, join, leave, timeout, user_metadata=None):
4242

4343
assert isinstance(event, six.string_types)
4444
assert isinstance(timestamp, six.integer_types)
@@ -57,6 +57,9 @@ def __init__(self, event, uuid, timestamp, occupancy, subscription, channel,
5757
self.timestamp = timestamp
5858
self.occupancy = occupancy
5959
self.state = state
60+
self.join = join
61+
self.leave = leave
62+
self.timeout = timeout
6063

6164
# DEPRECATED: subscribed_channel and actual_channel properties are deprecated
6265
# self.subscribed_channel = subscribed_channel <= now known as subscription

pubnub/workers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ def _process_incoming_payload(self, message):
6666
occupancy=presence_payload.occupancy,
6767
uuid=presence_payload.uuid,
6868
timestamp=presence_payload.timestamp,
69-
state=presence_payload.data
69+
state=presence_payload.data,
70+
join=message.payload.get('join', None),
71+
leave=message.payload.get('leave', None),
72+
timeout=message.payload.get('timeout', None)
7073
)
7174
self._listener_manager.announce_presence(pn_presence_event_result)
7275
elif message.is_object:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='pubnub',
5-
version='4.1.6',
5+
version='4.1.7',
66
description='PubNub Real-time push service in the cloud',
77
author='PubNub',
88
author_email='[email protected]',

0 commit comments

Comments
 (0)