async channel helper sending fix

master
bakatrouble 5 months ago
parent 043ee029d2
commit 7961e016eb

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

Loading…
Cancel
Save