Commit a2e8b664 authored by Alexander's avatar Alexander

[stickers] Don't HTTP Upload when it's not available

parent aaafcbb0
......@@ -488,11 +488,16 @@ class StickersModule(BaseModule):
self._publish_pack(sticker_pack)
return
module = app.connections[self._account].get_module('HTTPUpload')
if not module.available:
ErrorDialog(_('Sticker Pack Upload'),
_('Cannot upload sticker pack as this is unsupported on the server.'))
return
self._pack_upload_state[sticker_pack.id_] = {}
for sticker in sticker_pack.stickers:
self._pack_upload_state[sticker_pack.id_][sticker.filename] = False
module = app.connections[self._account].get_module('HTTPUpload')
for sticker in sticker_pack.stickers:
transfer = module.make_transfer(sticker_path(sticker_pack.id_, sticker.filename),
None,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment