Skip to content

Commit

Permalink
Fix in example hwegh347545f
Browse files Browse the repository at this point in the history
  • Loading branch information
seba-aln committed May 9, 2024
1 parent acce821 commit 1c7eb85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/subscription_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ def file(self, _, file_message):
print('Creating channel object for "test"')
test1 = pubnub.channel(f'{channel}')
print('Creating subscription object for "test"')
t1_subscription = test1.subscription()
t1_subscription = test1.subscription(with_presence=True)
t1_subscription.on_message = on_message('listener_1')
t1_subscription.on_message_action = on_message_action('listener_1')
t1_subscription.on_presence = on_presence('listener_1')
t1_subscription.on_status = on_status('listener_1')
t1_subscription.on_signal = on_signal('listener_1')

print('We\'re not yet subscribed to channel "test". So let\'s do it now.')
t1_subscription.subscribe(with_presence=True)
t1_subscription.subscribe()
print("Now we're subscribed. We should receive status: connected")

# Testing message delivery
Expand Down

0 comments on commit 1c7eb85

Please sign in to comment.