alicezetion 1.8.3 → 1.8.4
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 +210 -375
- package/package.json +6 -3
- package/replit.nix +4 -4
- package/src/addExternalModule.js +17 -0
- package/src/addUserToGroup.js +113 -0
- package/src/changeAdminStatus.js +79 -0
- package/src/changeArchivedStatus.js +55 -0
- package/src/changeAvatar.js +93 -0
- package/src/changeBio.js +77 -0
- package/src/changeBlockedStatus.js +47 -0
- package/src/changeCover.js +73 -0
- package/src/changeGroupImage.js +132 -0
- package/src/changeName.js +79 -0
- package/src/changeNickname.js +59 -0
- package/src/changeThreadColor.js +65 -0
- package/src/changeThreadEmoji.js +55 -0
- package/{leiamnash → src}/chat.js +28 -3
- package/src/createNewGroup.js +86 -0
- package/src/createPoll.js +71 -0
- package/src/data/getThreadInfo.json +1 -0
- package/src/deleteMessage.js +56 -0
- package/src/deleteThread.js +56 -0
- package/src/forwardAttachment.js +60 -0
- package/src/getAccess.js +112 -0
- package/src/getAvatarUser.js +78 -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/{leiamnash → src}/getThreadInfo.js +70 -54
- package/src/getThreadList.js +237 -0
- package/src/getThreadPictures.js +79 -0
- package/src/getUserID.js +66 -0
- package/src/getUserInfo.js +163 -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/{leiamnash → src}/listenMqtt.js +16 -6
- package/src/listenNotification.js +88 -0
- package/src/logout.js +275 -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 +117 -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/searchStickers.js +52 -0
- package/src/seen.js +50 -0
- package/src/sendMessage.js +477 -0
- package/src/sendMessageMqtt.js +316 -0
- package/src/sendTypingIndicator.js +103 -0
- package/src/setMessageReaction.js +117 -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/utils.js +135 -176
- package/.cache/replit/modules.stamp +0 -1
- 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/changeAvatar.js +0 -127
- 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/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/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/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/uploadAttachment.js +0 -96
- /package/{leiamnash → src}/getMessage.js +0 -0
package/leiamnash/unfriend.js
DELETED
@@ -1,42 +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 unfriend(userID, callback) {
|
8
|
-
var resolveFunc = function () { };
|
9
|
-
var rejectFunc = function () { };
|
10
|
-
var returnPromise = new Promise(function (resolve, reject) {
|
11
|
-
resolveFunc = resolve;
|
12
|
-
rejectFunc = reject;
|
13
|
-
});
|
14
|
-
|
15
|
-
if (!callback) {
|
16
|
-
callback = function (err, friendList) {
|
17
|
-
if (err) return rejectFunc(err);
|
18
|
-
resolveFunc(friendList);
|
19
|
-
};
|
20
|
-
}
|
21
|
-
|
22
|
-
var form = {
|
23
|
-
uid: userID,
|
24
|
-
unref: "bd_friends_tab",
|
25
|
-
floc: "friends_tab",
|
26
|
-
"nctr[_mod]": "pagelet_timeline_app_collection_" + ctx.userID + ":2356318349:2"
|
27
|
-
};
|
28
|
-
|
29
|
-
defaultFuncs
|
30
|
-
.post("https://www.facebook.com/ajax/profile/removefriendconfirm.php", ctx.jar, form)
|
31
|
-
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
32
|
-
.then(function (resData) {
|
33
|
-
if (resData.error) throw resData;
|
34
|
-
return callback();
|
35
|
-
})
|
36
|
-
.catch(function (err) {
|
37
|
-
log.error("unfriend", err);
|
38
|
-
return callback(err);
|
39
|
-
});
|
40
|
-
return returnPromise;
|
41
|
-
};
|
42
|
-
};
|
@@ -1,39 +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 unsendMessage(messageID, callback) {
|
8
|
-
var resolveFunc = function () { };
|
9
|
-
var rejectFunc = function () { };
|
10
|
-
var returnPromise = new Promise(function (resolve, reject) {
|
11
|
-
resolveFunc = resolve;
|
12
|
-
rejectFunc = reject;
|
13
|
-
});
|
14
|
-
|
15
|
-
if (!callback) {
|
16
|
-
callback = function (err, friendList) {
|
17
|
-
if (err) return rejectFunc(err);
|
18
|
-
resolveFunc(friendList);
|
19
|
-
};
|
20
|
-
}
|
21
|
-
|
22
|
-
var form = {
|
23
|
-
message_id: messageID
|
24
|
-
};
|
25
|
-
|
26
|
-
defaultFuncs
|
27
|
-
.post("https://www.facebook.com/messaging/unsend_message/", ctx.jar, form)
|
28
|
-
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
29
|
-
.then(function (resData) {
|
30
|
-
if (resData.error) throw resData;
|
31
|
-
return callback();
|
32
|
-
})
|
33
|
-
.catch(function (err) {
|
34
|
-
log.error("unsendMessage", "» ParseAndCheckLogin got status code: 404. Bailing out of trying to parse response.");
|
35
|
-
return callback(err);
|
36
|
-
});
|
37
|
-
return returnPromise;
|
38
|
-
};
|
39
|
-
};
|
@@ -1,96 +0,0 @@
|
|
1
|
-
const utils = require("../utils");
|
2
|
-
const log = require("npmlog");
|
3
|
-
const bluebird = require("bluebird");
|
4
|
-
|
5
|
-
module.exports = function (defaultFuncs, api, ctx) {
|
6
|
-
function upload(attachments, callback) {
|
7
|
-
callback = callback || function () { };
|
8
|
-
const uploads = [];
|
9
|
-
|
10
|
-
// create an array of promises
|
11
|
-
for (let i = 0; i < attachments.length; i++) {
|
12
|
-
if (!utils.isReadableStream(attachments[i])) {
|
13
|
-
throw {
|
14
|
-
error:
|
15
|
-
"Attachment should be a readable stream and not " +
|
16
|
-
utils.getType(attachments[i]) +
|
17
|
-
"."
|
18
|
-
};
|
19
|
-
}
|
20
|
-
|
21
|
-
const form = {
|
22
|
-
upload_1024: attachments[i],
|
23
|
-
voice_clip: "true"
|
24
|
-
};
|
25
|
-
|
26
|
-
uploads.push(
|
27
|
-
defaultFuncs
|
28
|
-
.postFormData(
|
29
|
-
"https://upload.facebook.com/ajax/mercury/upload.php",
|
30
|
-
ctx.jar,
|
31
|
-
form,
|
32
|
-
{}
|
33
|
-
)
|
34
|
-
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
35
|
-
.then(function (resData) {
|
36
|
-
if (resData.error) {
|
37
|
-
throw resData;
|
38
|
-
}
|
39
|
-
|
40
|
-
// We have to return the data unformatted unless we want to change it
|
41
|
-
// back in sendMessage.
|
42
|
-
return resData.payload.metadata[0];
|
43
|
-
})
|
44
|
-
);
|
45
|
-
}
|
46
|
-
|
47
|
-
// resolve all promises
|
48
|
-
bluebird
|
49
|
-
.all(uploads)
|
50
|
-
.then(function (resData) {
|
51
|
-
callback(null, resData);
|
52
|
-
})
|
53
|
-
.catch(function (err) {
|
54
|
-
log.error("uploadAttachment", err);
|
55
|
-
return callback(err);
|
56
|
-
});
|
57
|
-
}
|
58
|
-
|
59
|
-
return function uploadAttachment(attachments, callback) {
|
60
|
-
if (
|
61
|
-
!attachments &&
|
62
|
-
!utils.isReadableStream(attachments) &&
|
63
|
-
!utils.getType(attachments) === "Array" &&
|
64
|
-
(utils.getType(attachments) === "Array" && !attachments.length)
|
65
|
-
)
|
66
|
-
throw { error: "Please pass an attachment or an array of attachments." };
|
67
|
-
|
68
|
-
let resolveFunc = function () { };
|
69
|
-
let rejectFunc = function () { };
|
70
|
-
const returnPromise = new Promise(function (resolve, reject) {
|
71
|
-
resolveFunc = resolve;
|
72
|
-
rejectFunc = reject;
|
73
|
-
});
|
74
|
-
|
75
|
-
if (!callback) {
|
76
|
-
callback = function (err, info) {
|
77
|
-
if (err) {
|
78
|
-
return rejectFunc(err);
|
79
|
-
}
|
80
|
-
resolveFunc(info);
|
81
|
-
};
|
82
|
-
}
|
83
|
-
|
84
|
-
if (utils.getType(attachments) !== "Array")
|
85
|
-
attachments = [attachments];
|
86
|
-
|
87
|
-
upload(attachments, (err, info) => {
|
88
|
-
if (err) {
|
89
|
-
return callback(err);
|
90
|
-
}
|
91
|
-
callback(null, info);
|
92
|
-
});
|
93
|
-
|
94
|
-
return returnPromise;
|
95
|
-
};
|
96
|
-
};
|
File without changes
|