async channel helper sending fix

This commit is contained in:
bakatrouble 2023-12-15 19:06:38 +03:00
parent 043ee029d2
commit 7961e016eb

View File

@ -62,7 +62,7 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig):
fpath = os.path.join(tempfile.gettempdir(), '{}.jpg'.format(uuid4()))
im.save(fpath)
qi = QueuedItem.objects.create(config=self, type='photo', args=json.dumps([]), message_id=None, image_hash=image_hash)
upload_image_rpc.apply_async(qi.pk, fpath, note or None)
upload_image_rpc.delay(qi.pk, fpath, note or None)
# if self.queued:
# m = bot.send_photo(config.tmp_uploads_chat_id, open(fpath, 'rb'), caption=note or None)
# else: