fix: [chats] fix chats image importer

This commit is contained in:
terrtia 2024-02-06 11:13:45 +01:00
parent 88f30833c2
commit 4168d07118
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 3 additions and 2 deletions

View file

@ -63,7 +63,8 @@ class DefaultFeeder:
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):

View file

@ -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