feat(service): Publish a sticker pack after downloading it
This commit is contained in:
parent
53dd598547
commit
2d13ff328e
@ -173,8 +173,37 @@ class StickersService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Publish but don't block
|
// Publish but don't block
|
||||||
// TODO(PapaTutuWawa): Convert
|
unawaited(
|
||||||
//unawaited(_publishStickerPack(remotePack));
|
_publishStickerPack(
|
||||||
|
moxxmpp.StickerPack(
|
||||||
|
remotePack.id,
|
||||||
|
remotePack.name,
|
||||||
|
remotePack.description,
|
||||||
|
moxxmpp.hashFunctionFromName(remotePack.hashAlgorithm),
|
||||||
|
remotePack.hashValue,
|
||||||
|
remotePack.stickers
|
||||||
|
.map((sticker) => moxxmpp.Sticker(
|
||||||
|
moxxmpp.FileMetadataData(
|
||||||
|
mediaType: sticker.mediaType,
|
||||||
|
desc: sticker.desc,
|
||||||
|
size: sticker.size,
|
||||||
|
width: sticker.width,
|
||||||
|
height: sticker.height,
|
||||||
|
thumbnails: [],
|
||||||
|
hashes: sticker.hashes,
|
||||||
|
),
|
||||||
|
sticker.urlSources
|
||||||
|
// ignore: unnecessary_lambdas
|
||||||
|
.map((src) => moxxmpp.StatelessFileSharingUrlSource(src))
|
||||||
|
.toList(),
|
||||||
|
// TODO(PapaTutuWawa): Store the suggests
|
||||||
|
<String, String>{},
|
||||||
|
),).toList(),
|
||||||
|
// TODO(PapaTutuWawa): Store this value
|
||||||
|
false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
return remotePack.copyWith(
|
return remotePack.copyWith(
|
||||||
stickers: stickersDb,
|
stickers: stickersDb,
|
||||||
|
Loading…
Reference in New Issue
Block a user