alicezetion 1.3.0 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.cache/replit/__replit_disk_meta.json +1 -1
- package/.cache/replit/nix/env.json +1 -1
- package/index.js +0 -0
- package/leiamnash/addExternalModule.js +10 -6
- package/leiamnash/addUserToGroup.js +52 -16
- package/leiamnash/changeAdminStatus.js +69 -37
- package/leiamnash/changeArchivedStatus.js +26 -12
- package/leiamnash/changeBio.js +19 -6
- package/leiamnash/changeBlockedStatus.js +14 -3
- package/leiamnash/changeGroupImage.js +40 -16
- package/leiamnash/changeNickname.js +27 -11
- package/leiamnash/changeThreadColor.js +20 -10
- package/leiamnash/changeThreadEmoji.js +24 -10
- package/leiamnash/chat.js +414 -279
- package/leiamnash/createNewGroup.js +28 -12
- package/leiamnash/createPoll.js +25 -13
- package/leiamnash/deleteMessage.js +24 -12
- package/leiamnash/deleteThread.js +25 -11
- package/leiamnash/forwardAttachment.js +26 -13
- package/leiamnash/getCurrentUserID.js +1 -1
- package/leiamnash/getEmojiUrl.js +4 -2
- package/leiamnash/getFriendsList.js +21 -10
- package/leiamnash/getThreadHistory.js +166 -58
- package/leiamnash/getThreadHistoryDeprecated.js +42 -20
- package/leiamnash/getThreadInfo.js +60 -25
- package/leiamnash/getThreadInfoDeprecated.js +42 -18
- package/leiamnash/getThreadList.js +66 -41
- package/leiamnash/getThreadListDeprecated.js +43 -14
- package/leiamnash/getThreadPictures.js +37 -17
- package/leiamnash/getUserID.js +14 -9
- package/leiamnash/getUserInfo.js +18 -12
- package/leiamnash/handleFriendRequest.js +52 -37
- package/leiamnash/handleMessageRequest.js +32 -14
- package/leiamnash/httpGet.js +17 -12
- package/leiamnash/httpPost.js +17 -12
- package/leiamnash/listenMqtt.js +2 -1
- package/leiamnash/logout.js +20 -13
- package/leiamnash/markAsDelivered.js +22 -11
- package/leiamnash/markAsRead.js +21 -11
- package/leiamnash/markAsReadAll.js +20 -10
- package/leiamnash/markAsSeen.js +18 -7
- package/leiamnash/muteThread.js +18 -11
- package/leiamnash/removeUserFromGroup.js +48 -14
- package/leiamnash/resolvePhotoUrl.js +17 -8
- package/leiamnash/searchForThread.js +21 -10
- package/leiamnash/sendTypingIndicator.js +47 -14
- package/leiamnash/setMessageReaction.js +26 -12
- package/leiamnash/setPostReaction.js +26 -13
- package/leiamnash/setTitle.js +29 -13
- package/leiamnash/threadColors.js +44 -28
- package/leiamnash/unfriend.js +19 -9
- package/leiamnash/unsendMessage.js +19 -9
- package/package.json +1 -1
- package/replit.nix +3 -1
- package/utils.js +0 -0
- package/leiamnash/forwardMessage.js +0 -0
- package/leiamnash/listen.js +0 -553
- package/leiamnash/listenMqtt-Test.js +0 -687
@@ -3,18 +3,20 @@
|
|
3
3
|
var utils = require("../utils");
|
4
4
|
var log = require("npmlog");
|
5
5
|
|
6
|
-
module.exports = function
|
6
|
+
module.exports = function(defaultFuncs, api, ctx) {
|
7
7
|
return function changeThreadEmoji(emoji, threadID, callback) {
|
8
|
-
var resolveFunc = function
|
9
|
-
var rejectFunc = function
|
8
|
+
var resolveFunc = function(){};
|
9
|
+
var rejectFunc = function(){};
|
10
10
|
var returnPromise = new Promise(function (resolve, reject) {
|
11
11
|
resolveFunc = resolve;
|
12
12
|
rejectFunc = reject;
|
13
13
|
});
|
14
14
|
|
15
15
|
if (!callback) {
|
16
|
-
callback = function
|
17
|
-
if (err)
|
16
|
+
callback = function(err) {
|
17
|
+
if (err) {
|
18
|
+
return rejectFunc(err);
|
19
|
+
}
|
18
20
|
resolveFunc();
|
19
21
|
};
|
20
22
|
}
|
@@ -24,14 +26,26 @@ module.exports = function (defaultFuncs, api, ctx) {
|
|
24
26
|
};
|
25
27
|
|
26
28
|
defaultFuncs
|
27
|
-
.post(
|
29
|
+
.post(
|
30
|
+
"https://www.facebook.com/messaging/save_thread_emoji/?source=thread_settings&__pc=EXP1%3Amessengerdotcom_pkg",
|
31
|
+
ctx.jar,
|
32
|
+
form
|
33
|
+
)
|
28
34
|
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
29
|
-
.then(function
|
30
|
-
if (resData.error === 1357031)
|
31
|
-
|
35
|
+
.then(function(resData) {
|
36
|
+
if (resData.error === 1357031) {
|
37
|
+
throw {
|
38
|
+
error:
|
39
|
+
"Trying to change emoji of a chat that doesn't exist. Have at least one message in the thread before trying to change the emoji."
|
40
|
+
};
|
41
|
+
}
|
42
|
+
if (resData.error) {
|
43
|
+
throw resData;
|
44
|
+
}
|
45
|
+
|
32
46
|
return callback();
|
33
47
|
})
|
34
|
-
.catch(function
|
48
|
+
.catch(function(err) {
|
35
49
|
log.error("changeThreadEmoji", err);
|
36
50
|
return callback(err);
|
37
51
|
});
|