fix: [chats] fix chats image importer

dev
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') return self.json_data.get('data')
def get_obj_type(self): def get_obj_type(self):
return self.json_data.get('type', 'item') meta = self.get_json_meta()
return meta.get('type', 'item')
## OVERWRITE ME ## ## OVERWRITE ME ##
def get_obj(self): 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}' new_thread_id = f'{chat_id}/{subchannel_id}/{thread_id}'
thread = ChatThread(new_thread_id, chat_instance) thread = ChatThread(new_thread_id, chat_instance)
if not thread.exists(): if not thread.is_children():
thread.create(container_obj, message_id) thread.create(container_obj, message_id)
return thread return thread