Skip to content

Commit 169cb07

Browse files
committed
2 mo realization: subscriber has to have event type
1 parent 07fdbf5 commit 169cb07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

firebase.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ def run(self):
4343
self.sse = ClosableSSEClient(self.URL)
4444
for msg in self.sse:
4545
msg_data = json.loads(msg.data)
46+
msg_event = msg.event
4647
if msg_data is None: # keep-alives
4748
continue
48-
self.function(msg_data)
49+
self.function((msg.event, msg_data))
4950
except socket.error:
5051
pass # this can happen when we close the stream
5152
except KeyboardInterrupt:

0 commit comments

Comments
 (0)