Skip to content

Commit

Permalink
fix: function sticker
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Feb 18, 2021
1 parent 1c18017 commit c1e40b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/wapi/functions/send-sticker.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,19 @@ export async function sendSticker(sticker, chatId, metadata, type) {
if (!chat.erro) {
var stick = new window.Store.Sticker.default.modelClass();

stick.__x_clientUrl = sticker.clientUrl;
stick.__x_deprecatedMms3Url = sticker.clientUrl;
stick.__x_encFilehash = sticker.encFilehash;
stick.__x_filehash = sticker.filehash;
stick.__x_id = sticker.filehash;
stick.__x_uploadhash = sticker.uploadhash;
stick.__x_mediaKey = sticker.mediaKey;
stick.__x_size = sticker.mediaBlob.size;
stick.__x_initialized = false;
stick.__x_mediaData.mediaStage = 'INIT';
stick.__X_mediaKeyTimestamp = sticker.mediaKeyTimestamp;

stick.mimetype = 'image/webp';
stick.__x_directPath = sticker.directPath;
stick.height = metadata && metadata.height ? metadata.height : 512;
stick.width = metadata && metadata.width ? metadata.width : 512;

Expand Down

0 comments on commit c1e40b2

Please sign in to comment.