File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,10 @@ def __listen_to_events(self, data):
38
38
try :
39
39
decoded_data = data if type (data ) == str else data .decode ('utf-8' )
40
40
json_data = json .loads (decoded_data )
41
- if 'type' in json_data and json_data ['type' ] == 'message' and 'data ' in json_data ['message' ] and 'conversationId' in json_data ['message' ]['data' ] :
41
+ if 'type' in json_data and json_data ['type' ] == 'message' and 'type ' in json_data ['message' ] and json_data ['message' ]['type' ] == "conversation_created" :
42
42
self .__set_conversation (str (json_data ['message' ]['data' ]['conversationId' ]))
43
43
Log .getInstance ().info ("Conversation id is {}" .format (str (json_data ['message' ]['data' ]['conversationId' ])))
44
+ elif 'type' in json_data and json_data ['type' ] == 'message' and 'type' in json_data ['message' ] and json_data ['message' ]['type' ] == "started_listening" :
44
45
Log .getInstance ().info ("Started Listening..." )
45
46
elif 'type' in json_data and json_data ['type' ] in self .event_callbacks :
46
47
self .event_callbacks [json_data ['type' ]](json_data )
You can’t perform that action at this time.
0 commit comments