Skip to content
This repository was archived by the owner on Dec 20, 2021. It is now read-only.

Commit 1aa9502

Browse files
committed
Account for private location
1 parent 860f540 commit 1aa9502

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/async/WebSocket Client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
class AClient(AWSSClient):
66
async def on_friend_location(self, friend, world, location, instance):
7-
print("{} is now in {}.".format(friend.displayName, world.name))
7+
print("{} is now in {}.".format(friend.displayName,
8+
"a private world" if location == "private" else world.name))
89

910
async def on_friend_offline(self, friend):
1011
print("{} went offline.".format(friend.displayName))

examples/sync/WebSocket Client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
class Client(WSSClient):
55
def on_friend_location(self, friend, world, location, instance):
6-
print("{} is now in {}.".format(friend.displayName, world.name))
6+
print("{} is now in {}.".format(friend.displayName,
7+
"a private world" if location == "private" else world.name))
78

89
def on_friend_offline(self, friend):
910
print("{} went offline.".format(friend.displayName))

0 commit comments

Comments
 (0)