Skip to content

Commit

Permalink
fix: sendSticker 'modelClass' of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
joaosouz4dev committed Nov 6, 2020
1 parent a661e1c commit 9166c68
Showing 1 changed file with 1 addition and 1 deletion.
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.Sticker.modelClass();
stick = new window.Store.StickerPack.modelClass();

stick.__x_clientUrl = sticker.clientUrl;
stick.__x_filehash = sticker.filehash;
Expand Down

1 comment on commit 9166c68

@jonalan7
Copy link
Contributor

Choose a reason for hiding this comment

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

Tá errado mano!
O caminho window.Store.StickerPack não existe a função do sendToChat().
Testei a função sendImageAsSticker(); e retornou um erro sendToChat is not a function
Quanto você fizer um commit verifica se a função esta funcionando!

Please sign in to comment.