@@ -19,7 +19,8 @@ def __ws_message(self, ws, message):
1919 switch = {
2020 "friend-location" : self .__ws_friend_location ,
2121 "friend-active" : self .__ws_friend_active ,
22- "friend-offline" : self .__ws_friend_offline
22+ "friend-offline" : self .__ws_friend_offline ,
23+ "notification" : self .__ws_notification
2324 }
2425
2526 if message ["type" ] in switch :
@@ -70,6 +71,9 @@ def on_friend_offline(self, friend):
7071 def on_friend_location (self , friend ):
7172 pass
7273
74+ def on_notification (self , notification ):
75+ pass
76+
7377 # WS handles
7478
7579 def __ws_friend_active (self , content ):
@@ -84,6 +88,9 @@ def __ws_friend_location(self, content):
8488 def __ws_friend_offline (self , content ):
8589 self .on_friend_offline (self .fetch_user_by_id (content ["userId" ]))
8690
91+ def __ws_notification (self , content ):
92+ self .on_notification (None )
93+
8794 # Internal Client overwrites
8895
8996 def login (self , username , password ):
@@ -120,6 +127,9 @@ async def on_friend_offline(self, friend):
120127 async def on_friend_location (self , friend ):
121128 pass
122129
130+ async def on_notification (self , notification ):
131+ pass
132+
123133 # WS handles
124134
125135 async def __ws_friend_active (self , content ):
@@ -134,6 +144,9 @@ async def __ws_friend_location(self, content):
134144 async def __ws_friend_offline (self , content ):
135145 await self .on_friend_offline (await self .fetch_user_by_id (content ["userId" ]))
136146
147+ async def __ws_notification (self , content ):
148+ await self .on_notification (None )
149+
137150 # Internal Client overwrites
138151
139152 async def login (self , username , password ):
0 commit comments