Skip to content

Commit

Permalink
feat(conteex): fix sticker
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Nov 7, 2020
1 parent 9f4eeef commit f8feaae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lib/wapi/functions/encrypt-and-upload-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@ export async function encryptAndUploadFile(type, blob) {
filehash,
id: filehash,
uploadhash: encrypted.encFilehash,
mediaBlob: blob,
};
}
2 changes: 1 addition & 1 deletion src/lib/wapi/functions/send-sticker.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export async function sendSticker(sticker, chatId, metadata, type) {

if (chat.erro === false || chat.__x_id) {
var ListChat = await Store.Chat.get(chatId),
stick = new window.Store.StickerPack.modelClass();
stick = new window.Store.Sticker.default.modelClass();

stick.__x_clientUrl = sticker.clientUrl;
stick.__x_filehash = sticker.filehash;
Expand Down
9 changes: 8 additions & 1 deletion src/lib/wapi/store/store-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,14 @@ export const storeObjects = [
{
id: 'Sticker',
conditions: (module) =>
module.default && module.default.Sticker ? module.default.Sticker : null,
module.StickerCollection && module.default ? module : null,
},
{
id: 'MediaObject',
conditions: (module) =>
module.getOrCreateMediaObject && module.disassociateMediaFromStickerPack
? module
: null,
},
{
id: 'MediaUpload',
Expand Down

1 comment on commit f8feaae

@jonalan7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#289 UnhandledPromiseRejectionWarning: on send Sticker

Please sign in to comment.