Skip to content

Commit

Permalink
fix: [chats] fix chats image importer
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Feb 6, 2024
1 parent 88f3083 commit 4168d07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/importer/feeders/Default.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def get_gzip64_content(self):
return self.json_data.get('data')

def get_obj_type(self):
return self.json_data.get('type', 'item')
meta = self.get_json_meta()
return meta.get('type', 'item')

## OVERWRITE ME ##
def get_obj(self):
Expand Down
2 changes: 1 addition & 1 deletion bin/lib/objects/ChatThreads.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def create(thread_id, chat_instance, chat_id, subchannel_id, message_id, contain
new_thread_id = f'{chat_id}/{subchannel_id}/{thread_id}'

thread = ChatThread(new_thread_id, chat_instance)
if not thread.exists():
if not thread.is_children():
thread.create(container_obj, message_id)
return thread

Expand Down

0 comments on commit 4168d07

Please sign in to comment.