Browse Source

Merge remote-tracking branch 'celogeek/fixes-ios-and-more'

pull/49/head
Tulir Asokan 3 years ago
parent
commit
591137ccb3
  1. 1
      sticker/lib/matrix.py
  2. 1
      sticker/lib/util.py
  3. 3
      sticker/stickerimport.py

1
sticker/lib/matrix.py

@ -42,6 +42,7 @@ if TYPE_CHECKING:
url: str url: str
info: MediaInfo info: MediaInfo
id: str id: str
msgtype: str
else: else:
MediaInfo = None MediaInfo = None
StickerInfo = None StickerInfo = None

1
sticker/lib/util.py

@ -76,4 +76,5 @@ def make_sticker(mxc: str, width: int, height: int, size: int,
"mimetype": "image/png", "mimetype": "image/png",
}, },
}, },
"msgtype": "m.sticker",
} }

3
sticker/stickerimport.py

@ -138,11 +138,12 @@ async def main(args: argparse.Namespace) -> None:
if args.list: if args.list:
stickers: AllStickers = await client(GetAllStickersRequest(hash=0)) stickers: AllStickers = await client(GetAllStickersRequest(hash=0))
index = 1 index = 1
width = len(str(stickers.sets))
width = len(str(len(stickers.sets)))
print("Your saved sticker packs:") print("Your saved sticker packs:")
for saved_pack in stickers.sets: for saved_pack in stickers.sets:
print(f"{index:>{width}}. {saved_pack.title} " print(f"{index:>{width}}. {saved_pack.title} "
f"(t.me/addstickers/{saved_pack.short_name})") f"(t.me/addstickers/{saved_pack.short_name})")
index += 1
elif args.pack[0]: elif args.pack[0]:
input_packs = [] input_packs = []
for pack_url in args.pack[0]: for pack_url in args.pack[0]:

Loading…
Cancel
Save