alicezetion 1.9.1 → 1.9.3
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +1 -1
- package/package.json +1 -1
- package/src/addExternalModule.js +19 -0
- package/src/addUserToGroup.js +113 -0
- package/src/changeAdminStatus.js +79 -0
- package/src/changeArchivedStatus.js +55 -0
- package/{leiamnash → src}/changeAvatar.js +2 -3
- package/src/changeBio.js +77 -0
- package/src/changeBlockedStatus.js +47 -0
- package/src/changeGroupImage.js +132 -0
- package/src/changeNickname.js +59 -0
- package/src/changeThreadColor.js +65 -0
- package/src/changeThreadEmoji.js +55 -0
- package/{leiamnash → src}/chat.js +29 -4
- package/src/createNewGroup.js +86 -0
- package/src/createPoll.js +71 -0
- package/src/deleteMessage.js +56 -0
- package/src/deleteThread.js +56 -0
- package/src/edit.js +66 -0
- package/src/forwardAttachment.js +60 -0
- package/src/getCurrentUserID.js +7 -0
- package/src/getEmojiUrl.js +29 -0
- package/src/getFriendsList.js +83 -0
- package/src/getThreadHistory.js +666 -0
- package/src/getThreadInfo.js +232 -0
- package/src/getThreadList.js +241 -0
- package/src/getThreadPictures.js +79 -0
- package/src/getUserID.js +66 -0
- package/src/getUserInfo.js +74 -0
- package/src/handleFriendRequest.js +61 -0
- package/src/handleMessageRequest.js +65 -0
- package/src/httpGet.js +57 -0
- package/src/httpPost.js +57 -0
- package/src/httpPostFormData.js +63 -0
- package/src/listenMqtt.js +853 -0
- package/src/logout.js +75 -0
- package/src/markAsDelivered.js +58 -0
- package/src/markAsRead.js +80 -0
- package/src/markAsReadAll.js +50 -0
- package/src/markAsSeen.js +59 -0
- package/src/muteThread.js +52 -0
- package/src/react.js +109 -0
- package/{leiamnash → src}/refreshFb_dtsg.js +1 -1
- package/src/removeUserFromGroup.js +79 -0
- package/src/resolvePhotoUrl.js +45 -0
- package/src/searchForThread.js +53 -0
- package/src/seen.js +50 -0
- package/src/sendMessage.js +477 -0
- package/src/sendTypingIndicator.js +103 -0
- package/src/setMessageReaction.js +121 -0
- package/src/setPostReaction.js +109 -0
- package/src/setTitle.js +86 -0
- package/src/threadColors.js +131 -0
- package/src/unfriend.js +52 -0
- package/src/unsendMessage.js +49 -0
- package/{leiamnash → src}/uploadAttachment.js +1 -2
- package/leiamnash/addExternalModule.js +0 -15
- package/leiamnash/addUserToGroup.js +0 -77
- package/leiamnash/changeAdminStatus.js +0 -47
- package/leiamnash/changeArchivedStatus.js +0 -41
- package/leiamnash/changeBio.js +0 -64
- package/leiamnash/changeBlockedStatus.js +0 -36
- package/leiamnash/changeGroupImage.js +0 -105
- package/leiamnash/changeNickname.js +0 -43
- package/leiamnash/changeThreadColor.js +0 -61
- package/leiamnash/changeThreadEmoji.js +0 -41
- package/leiamnash/createNewGroup.js +0 -70
- package/leiamnash/createPoll.js +0 -59
- package/leiamnash/deleteMessage.js +0 -44
- package/leiamnash/deleteThread.js +0 -42
- package/leiamnash/edit.js +0 -59
- package/leiamnash/forwardAttachment.js +0 -47
- package/leiamnash/forwardMessage.js +0 -0
- package/leiamnash/getCurrentUserID.js +0 -7
- package/leiamnash/getEmojiUrl.js +0 -27
- package/leiamnash/getFriendsList.js +0 -73
- package/leiamnash/getInfoVideo.js +0 -134
- package/leiamnash/getThreadHistory.js +0 -537
- package/leiamnash/getThreadHistoryDeprecated.js +0 -71
- package/leiamnash/getThreadInfo.js +0 -171
- package/leiamnash/getThreadInfoDeprecated.js +0 -56
- package/leiamnash/getThreadList.js +0 -213
- package/leiamnash/getThreadListDeprecated.js +0 -46
- package/leiamnash/getThreadPictures.js +0 -59
- package/leiamnash/getUserID.js +0 -61
- package/leiamnash/getUserInfo.js +0 -66
- package/leiamnash/handleFriendRequest.js +0 -46
- package/leiamnash/handleMessageRequest.js +0 -47
- package/leiamnash/httpGet.js +0 -47
- package/leiamnash/httpPost.js +0 -47
- package/leiamnash/httpPostFormData.js +0 -42
- package/leiamnash/listenMqtt.js +0 -853
- package/leiamnash/logout.js +0 -68
- package/leiamnash/markAsDelivered.js +0 -47
- package/leiamnash/markAsRead.js +0 -70
- package/leiamnash/markAsReadAll.js +0 -40
- package/leiamnash/markAsSeen.js +0 -48
- package/leiamnash/muteThread.js +0 -45
- package/leiamnash/react.js +0 -109
- package/leiamnash/removeUserFromGroup.js +0 -45
- package/leiamnash/resolvePhotoUrl.js +0 -36
- package/leiamnash/searchForThread.js +0 -42
- package/leiamnash/seen.js +0 -40
- package/leiamnash/sendMessage.js +0 -315
- package/leiamnash/sendTypingIndicator.js +0 -70
- package/leiamnash/setMessageReaction.js +0 -103
- package/leiamnash/setPostReaction.js +0 -63
- package/leiamnash/setTitle.js +0 -70
- package/leiamnash/threadColors.js +0 -41
- package/leiamnash/unfriend.js +0 -42
- package/leiamnash/unsendMessage.js +0 -39
- /package/{leiamnash → src}/getMessage.js +0 -0
@@ -1,46 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var utils = require("../utils");
|
4
|
-
var log = require("npmlog");
|
5
|
-
|
6
|
-
module.exports = function(defaultFuncs, api, ctx) {
|
7
|
-
return function handleFriendRequest(userID, accept, callback) {
|
8
|
-
if (utils.getType(accept) !== "Boolean") throw { error: "Please pass a boolean as a second argument." };
|
9
|
-
|
10
|
-
var resolveFunc = function() {};
|
11
|
-
var rejectFunc = function() {};
|
12
|
-
var returnPromise = new Promise(function(resolve, reject) {
|
13
|
-
resolveFunc = resolve;
|
14
|
-
rejectFunc = reject;
|
15
|
-
});
|
16
|
-
|
17
|
-
if (!callback) {
|
18
|
-
callback = function(err, data) {
|
19
|
-
if (err) return rejectFunc(err);
|
20
|
-
resolveFunc(data);
|
21
|
-
};
|
22
|
-
}
|
23
|
-
|
24
|
-
var form = {
|
25
|
-
viewer_id: userID,
|
26
|
-
"frefs[0]": "jwl",
|
27
|
-
floc: "friend_center_requests",
|
28
|
-
ref: "/reqs.php",
|
29
|
-
action: (accept ? "confirm" : "reject")
|
30
|
-
};
|
31
|
-
|
32
|
-
defaultFuncs
|
33
|
-
.post("https://www.facebook.com/requests/friends/ajax/", ctx.jar, form)
|
34
|
-
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
35
|
-
.then(function(resData) {
|
36
|
-
if (resData.payload.err) throw { err: resData.payload.err };
|
37
|
-
return callback();
|
38
|
-
})
|
39
|
-
.catch(function(err) {
|
40
|
-
log.error("handleFriendRequest", err);
|
41
|
-
return callback(err);
|
42
|
-
});
|
43
|
-
|
44
|
-
return returnPromise;
|
45
|
-
};
|
46
|
-
};
|
@@ -1,47 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var utils = require("../utils");
|
4
|
-
var log = require("npmlog");
|
5
|
-
|
6
|
-
module.exports = function (defaultFuncs, api, ctx) {
|
7
|
-
return function handleMessageRequest(threadID, accept, callback) {
|
8
|
-
if (utils.getType(accept) !== "Boolean") throw { error: "Please pass a boolean as a second argument." };
|
9
|
-
|
10
|
-
var resolveFunc = function () { };
|
11
|
-
var rejectFunc = function () { };
|
12
|
-
var returnPromise = new Promise(function (resolve, reject) {
|
13
|
-
resolveFunc = resolve;
|
14
|
-
rejectFunc = reject;
|
15
|
-
});
|
16
|
-
|
17
|
-
if (!callback) {
|
18
|
-
callback = function (err, data) {
|
19
|
-
if (err) return rejectFunc(err);
|
20
|
-
resolveFunc(data);
|
21
|
-
};
|
22
|
-
}
|
23
|
-
|
24
|
-
var form = {
|
25
|
-
client: "mercury"
|
26
|
-
};
|
27
|
-
|
28
|
-
if (utils.getType(threadID) !== "Array") threadID = [threadID];
|
29
|
-
|
30
|
-
var messageBox = accept ? "inbox" : "other";
|
31
|
-
for (var i = 0; i < threadID.length; i++) form[messageBox + "[" + i + "]"] = threadID[i];
|
32
|
-
|
33
|
-
defaultFuncs
|
34
|
-
.post("https://www.facebook.com/ajax/mercury/move_thread.php", ctx.jar, form)
|
35
|
-
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
36
|
-
.then(function (resData) {
|
37
|
-
if (resData.error) throw resData;
|
38
|
-
return callback();
|
39
|
-
})
|
40
|
-
.catch(function (err) {
|
41
|
-
log.error("handleMessageRequest", err);
|
42
|
-
return callback(err);
|
43
|
-
});
|
44
|
-
|
45
|
-
return returnPromise;
|
46
|
-
};
|
47
|
-
};
|
package/leiamnash/httpGet.js
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var utils = require("../utils");
|
4
|
-
var log = require("npmlog");
|
5
|
-
|
6
|
-
module.exports = function (defaultFuncs, api, ctx) {
|
7
|
-
return function httpGet(url, form, callback, notAPI) {
|
8
|
-
var resolveFunc = function () { };
|
9
|
-
var rejectFunc = function () { };
|
10
|
-
|
11
|
-
var returnPromise = new Promise(function (resolve, reject) {
|
12
|
-
resolveFunc = resolve;
|
13
|
-
rejectFunc = reject;
|
14
|
-
});
|
15
|
-
|
16
|
-
if (!callback && (utils.getType(form) == "Function" || utils.getType(form) == "AsyncFunction")) {
|
17
|
-
callback = form;
|
18
|
-
form = {};
|
19
|
-
}
|
20
|
-
form = form || {};
|
21
|
-
|
22
|
-
callback = callback || function (err, data) {
|
23
|
-
if (err) return rejectFunc(err);
|
24
|
-
resolveFunc(data);
|
25
|
-
};
|
26
|
-
|
27
|
-
if (notAPI) {
|
28
|
-
utils
|
29
|
-
.get(url, ctx.jar, form, ctx.globalOptions)
|
30
|
-
.then(resData => callback(null, resData.body.toString()))
|
31
|
-
.catch(function (err) {
|
32
|
-
log.error("httpGet", err);
|
33
|
-
return callback(err);
|
34
|
-
});
|
35
|
-
}
|
36
|
-
else {
|
37
|
-
defaultFuncs
|
38
|
-
.get(url, ctx.jar, form)
|
39
|
-
.then(resData => callback(null, resData.body.toString()))
|
40
|
-
.catch(function (err) {
|
41
|
-
log.error("httpGet", err);
|
42
|
-
return callback(err);
|
43
|
-
});
|
44
|
-
}
|
45
|
-
return returnPromise;
|
46
|
-
};
|
47
|
-
};
|
package/leiamnash/httpPost.js
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var utils = require("../utils");
|
4
|
-
var log = require("npmlog");
|
5
|
-
|
6
|
-
module.exports = function (defaultFuncs, api, ctx) {
|
7
|
-
return function httpGet(url, form, callback, notAPI) {
|
8
|
-
var resolveFunc = function () { };
|
9
|
-
var rejectFunc = function () { };
|
10
|
-
|
11
|
-
var returnPromise = new Promise(function (resolve, reject) {
|
12
|
-
resolveFunc = resolve;
|
13
|
-
rejectFunc = reject;
|
14
|
-
});
|
15
|
-
|
16
|
-
if (!callback && (utils.getType(form) == "Function" || utils.getType(form) == "AsyncFunction")) {
|
17
|
-
callback = form;
|
18
|
-
form = {};
|
19
|
-
}
|
20
|
-
form = form || {};
|
21
|
-
|
22
|
-
callback = callback || function (err, data) {
|
23
|
-
if (err) return rejectFunc(err);
|
24
|
-
resolveFunc(data);
|
25
|
-
};
|
26
|
-
|
27
|
-
if (notAPI) {
|
28
|
-
utils
|
29
|
-
.post(url, ctx.jar, form, ctx.globalOptions)
|
30
|
-
.then(resData => callback(null, resData.body.toString()))
|
31
|
-
.catch(function (err) {
|
32
|
-
log.error("httpPost", err);
|
33
|
-
return callback(err);
|
34
|
-
});
|
35
|
-
}
|
36
|
-
else {
|
37
|
-
defaultFuncs
|
38
|
-
.post(url, ctx.jar, form, {})
|
39
|
-
.then(resData => callback(null, resData.body.toString()))
|
40
|
-
.catch(function (err) {
|
41
|
-
log.error("httpPost", err);
|
42
|
-
return callback(err);
|
43
|
-
});
|
44
|
-
}
|
45
|
-
return returnPromise;
|
46
|
-
};
|
47
|
-
};
|
@@ -1,42 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var utils = require("../utils");
|
4
|
-
var log = require("npmlog");
|
5
|
-
|
6
|
-
|
7
|
-
module.exports = function(defaultFuncs, api, ctx) {
|
8
|
-
|
9
|
-
return function httpPostFormData(url, form, callback) {
|
10
|
-
var resolveFunc = function(){};
|
11
|
-
var rejectFunc = function(){};
|
12
|
-
|
13
|
-
var returnPromise = new Promise(function (resolve, reject) {
|
14
|
-
resolveFunc = resolve;
|
15
|
-
rejectFunc = reject;
|
16
|
-
});
|
17
|
-
|
18
|
-
if (!callback && (utils.getType(form) == "Function" || utils.getType(form) == "AsyncFunction")) {
|
19
|
-
callback = form;
|
20
|
-
form = {};
|
21
|
-
}
|
22
|
-
|
23
|
-
form = form || {};
|
24
|
-
|
25
|
-
callback = callback || function(err, data) {
|
26
|
-
if (err) return rejectFunc(err);
|
27
|
-
resolveFunc(data);
|
28
|
-
};
|
29
|
-
|
30
|
-
defaultFuncs
|
31
|
-
.postFormData(url, ctx.jar, form)
|
32
|
-
.then(function(resData) {
|
33
|
-
callback(null, resData.body.toString());
|
34
|
-
})
|
35
|
-
.catch(function(err) {
|
36
|
-
log.error("httpPostFormData", err);
|
37
|
-
return callback(err);
|
38
|
-
});
|
39
|
-
|
40
|
-
return returnPromise;
|
41
|
-
};
|
42
|
-
};
|