alicezetion 1.5.7 → 1.5.9
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 +489 -526
- package/leiamnash/addExternalModule.js +15 -19
- package/leiamnash/addUserToGroup.js +77 -113
- package/leiamnash/changeAdminStatus.js +47 -79
- package/leiamnash/changeArchivedStatus.js +41 -55
- package/leiamnash/changeBio.js +64 -77
- package/leiamnash/changeBlockedStatus.js +36 -47
- package/leiamnash/changeGroupImage.js +105 -129
- package/leiamnash/changeNickname.js +43 -59
- package/leiamnash/changeThreadColor.js +61 -71
- package/leiamnash/changeThreadEmoji.js +41 -55
- package/leiamnash/chat.js +324 -459
- package/leiamnash/createNewGroup.js +70 -86
- package/leiamnash/createPoll.js +59 -71
- package/leiamnash/deleteMessage.js +44 -56
- package/leiamnash/deleteThread.js +42 -56
- package/leiamnash/forwardAttachment.js +47 -60
- package/leiamnash/forwardMessage.js +0 -0
- package/leiamnash/getCurrentUserID.js +7 -7
- package/leiamnash/getEmojiUrl.js +27 -29
- package/leiamnash/getFriendsList.js +73 -84
- package/leiamnash/getThreadHistory.js +537 -645
- package/leiamnash/getThreadHistoryDeprecated.js +71 -93
- package/leiamnash/getThreadInfo.js +171 -206
- package/leiamnash/getThreadInfoDeprecated.js +56 -80
- package/leiamnash/getThreadList.js +213 -238
- package/leiamnash/getThreadListDeprecated.js +46 -75
- package/leiamnash/getThreadPictures.js +59 -79
- package/leiamnash/getUserID.js +61 -66
- package/leiamnash/getUserInfo.js +66 -72
- package/leiamnash/handleFriendRequest.js +46 -61
- package/leiamnash/handleMessageRequest.js +47 -65
- package/leiamnash/httpGet.js +47 -52
- package/leiamnash/httpPost.js +47 -52
- package/leiamnash/listen.js +553 -0
- package/leiamnash/listenMqtt-Test.js +687 -0
- package/leiamnash/listenMqtt.js +685 -789
- package/leiamnash/logout.js +68 -75
- package/leiamnash/markAsDelivered.js +47 -58
- package/leiamnash/markAsRead.js +70 -80
- package/leiamnash/markAsReadAll.js +39 -49
- package/leiamnash/markAsSeen.js +48 -59
- package/leiamnash/muteThread.js +45 -52
- package/leiamnash/removeUserFromGroup.js +45 -79
- package/leiamnash/resolvePhotoUrl.js +36 -45
- package/leiamnash/searchForThread.js +42 -53
- package/leiamnash/sendTypingIndicator.js +70 -103
- package/leiamnash/setMessageReaction.js +103 -117
- package/leiamnash/setPostReaction.js +63 -76
- package/leiamnash/setTitle.js +70 -86
- package/leiamnash/threadColors.js +41 -57
- package/leiamnash/unfriend.js +42 -52
- package/leiamnash/unsendMessage.js +39 -49
- package/package.json +73 -71
- package/utils.js +1198 -1356
@@ -1,86 +1,70 @@
|
|
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 createNewGroup(participantIDs, groupTitle, callback) {
|
8
|
-
if (utils.getType(groupTitle) == "Function") {
|
9
|
-
callback = groupTitle;
|
10
|
-
groupTitle = null;
|
11
|
-
}
|
12
|
-
|
13
|
-
if (utils.getType(participantIDs) !== "Array") {
|
14
|
-
|
15
|
-
}
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
)
|
72
|
-
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
73
|
-
.then(function(resData) {
|
74
|
-
if (resData.errors) {
|
75
|
-
throw resData;
|
76
|
-
}
|
77
|
-
return callback(null, resData.data.messenger_group_thread_create.thread.thread_key.thread_fbid);
|
78
|
-
})
|
79
|
-
.catch(function(err) {
|
80
|
-
log.error("createNewGroup", err);
|
81
|
-
return callback(err);
|
82
|
-
});
|
83
|
-
|
84
|
-
return returnPromise;
|
85
|
-
};
|
86
|
-
};
|
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 createNewGroup(participantIDs, groupTitle, callback) {
|
8
|
+
if (utils.getType(groupTitle) == "Function") {
|
9
|
+
callback = groupTitle;
|
10
|
+
groupTitle = null;
|
11
|
+
}
|
12
|
+
|
13
|
+
if (utils.getType(participantIDs) !== "Array") throw { error: "createNewGroup: participantIDs should be an array." };
|
14
|
+
|
15
|
+
if (participantIDs.length < 2) throw { error: "createNewGroup: participantIDs should have at least 2 IDs." };
|
16
|
+
|
17
|
+
var resolveFunc = function () { };
|
18
|
+
var rejectFunc = function () { };
|
19
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
20
|
+
resolveFunc = resolve;
|
21
|
+
rejectFunc = reject;
|
22
|
+
});
|
23
|
+
|
24
|
+
if (!callback) {
|
25
|
+
callback = function (err, threadID) {
|
26
|
+
if (err) return rejectFunc(err);
|
27
|
+
resolveFunc(threadID);
|
28
|
+
};
|
29
|
+
}
|
30
|
+
|
31
|
+
var pids = [];
|
32
|
+
for (var n in participantIDs) pids.push({ fbid: participantIDs[n] });
|
33
|
+
pids.push({ fbid: ctx.userID });
|
34
|
+
|
35
|
+
var form = {
|
36
|
+
fb_api_caller_class: "RelayModern",
|
37
|
+
fb_api_req_friendly_name: "MessengerGroupCreateMutation",
|
38
|
+
av: ctx.userID,
|
39
|
+
//This doc_id is valid as of January 11th, 2020
|
40
|
+
doc_id: "577041672419534",
|
41
|
+
variables: JSON.stringify({
|
42
|
+
input: {
|
43
|
+
entry_point: "jewel_new_group",
|
44
|
+
actor_id: ctx.userID,
|
45
|
+
participants: pids,
|
46
|
+
client_mutation_id: Math.round(Math.random() * 1024).toString(),
|
47
|
+
thread_settings: {
|
48
|
+
name: groupTitle,
|
49
|
+
joinable_mode: "PRIVATE",
|
50
|
+
thread_image_fbid: null
|
51
|
+
}
|
52
|
+
}
|
53
|
+
})
|
54
|
+
};
|
55
|
+
|
56
|
+
defaultFuncs
|
57
|
+
.post("https://www.facebook.com/api/graphql/", ctx.jar, form)
|
58
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
59
|
+
.then(function (resData) {
|
60
|
+
if (resData.errors) throw resData;
|
61
|
+
return callback(null, resData.data.messenger_group_thread_create.thread.thread_key.thread_fbid);
|
62
|
+
})
|
63
|
+
.catch(function (err) {
|
64
|
+
log.error("createNewGroup", err);
|
65
|
+
return callback(err);
|
66
|
+
});
|
67
|
+
|
68
|
+
return returnPromise;
|
69
|
+
};
|
70
|
+
};
|
package/leiamnash/createPoll.js
CHANGED
@@ -1,71 +1,59 @@
|
|
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 createPoll(title, threadID, options, 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
|
-
if (utils.getType(options) == "Function") {
|
17
|
-
callback = options;
|
18
|
-
options = null;
|
19
|
-
}
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
)
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
}
|
61
|
-
|
62
|
-
return callback();
|
63
|
-
})
|
64
|
-
.catch(function(err) {
|
65
|
-
log.error("createPoll", err);
|
66
|
-
return callback(err);
|
67
|
-
});
|
68
|
-
|
69
|
-
return returnPromise;
|
70
|
-
};
|
71
|
-
};
|
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 createPoll(title, threadID, options, 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
|
+
if (utils.getType(options) == "Function") {
|
17
|
+
callback = options;
|
18
|
+
options = null;
|
19
|
+
}
|
20
|
+
else {
|
21
|
+
callback = function (err) {
|
22
|
+
if (err) return rejectFunc(err);
|
23
|
+
resolveFunc();
|
24
|
+
};
|
25
|
+
}
|
26
|
+
}
|
27
|
+
if (!options) options = {}; // Initial poll options are optional
|
28
|
+
|
29
|
+
var form = {
|
30
|
+
target_id: threadID,
|
31
|
+
question_text: title
|
32
|
+
};
|
33
|
+
|
34
|
+
// Set fields for options (and whether they are selected initially by the posting user)
|
35
|
+
var ind = 0;
|
36
|
+
for (var opt in options) {
|
37
|
+
// eslint-disable-next-line no-prototype-builtins
|
38
|
+
if (options.hasOwnProperty(opt)) {
|
39
|
+
form["option_text_array[" + ind + "]"] = opt;
|
40
|
+
form["option_is_selected_array[" + ind + "]"] = options[opt] ? "1" : "0";
|
41
|
+
ind++;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
defaultFuncs
|
46
|
+
.post("https://www.facebook.com/messaging/group_polling/create_poll/?dpr=1", ctx.jar, form)
|
47
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
48
|
+
.then(function (resData) {
|
49
|
+
if (resData.payload.status != "success") throw resData;
|
50
|
+
return callback();
|
51
|
+
})
|
52
|
+
.catch(function (err) {
|
53
|
+
log.error("createPoll", err);
|
54
|
+
return callback(err);
|
55
|
+
});
|
56
|
+
|
57
|
+
return returnPromise;
|
58
|
+
};
|
59
|
+
};
|
@@ -1,56 +1,44 @@
|
|
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 deleteMessage(messageOrMessages, 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
|
-
if (!callback) {
|
15
|
-
callback = function(err) {
|
16
|
-
if (err)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
)
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
return callback();
|
48
|
-
})
|
49
|
-
.catch(function(err) {
|
50
|
-
log.error("deleteMessage", err);
|
51
|
-
return callback(err);
|
52
|
-
});
|
53
|
-
|
54
|
-
return returnPromise;
|
55
|
-
};
|
56
|
-
};
|
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 deleteMessage(messageOrMessages, 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
|
+
if (!callback) {
|
15
|
+
callback = function (err) {
|
16
|
+
if (err) return rejectFunc(err);
|
17
|
+
|
18
|
+
resolveFunc();
|
19
|
+
};
|
20
|
+
}
|
21
|
+
|
22
|
+
var form = {
|
23
|
+
client: "mercury"
|
24
|
+
};
|
25
|
+
|
26
|
+
if (utils.getType(messageOrMessages) !== "Array") messageOrMessages = [messageOrMessages];
|
27
|
+
|
28
|
+
for (var i = 0; i < messageOrMessages.length; i++) form["message_ids[" + i + "]"] = messageOrMessages[i];
|
29
|
+
|
30
|
+
defaultFuncs
|
31
|
+
.post("https://www.facebook.com/ajax/mercury/delete_messages.php", ctx.jar, form)
|
32
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
33
|
+
.then(function (resData) {
|
34
|
+
if (resData.error) throw resData;
|
35
|
+
return callback();
|
36
|
+
})
|
37
|
+
.catch(function (err) {
|
38
|
+
log.error("deleteMessage", err);
|
39
|
+
return callback(err);
|
40
|
+
});
|
41
|
+
|
42
|
+
return returnPromise;
|
43
|
+
};
|
44
|
+
};
|
@@ -1,56 +1,42 @@
|
|
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 deleteThread(threadOrThreads, 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
|
-
if (!callback) {
|
15
|
-
callback = function(err) {
|
16
|
-
if (err)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
if (resData.error) {
|
44
|
-
throw resData;
|
45
|
-
}
|
46
|
-
|
47
|
-
return callback();
|
48
|
-
})
|
49
|
-
.catch(function(err) {
|
50
|
-
log.error("deleteThread", err);
|
51
|
-
return callback(err);
|
52
|
-
});
|
53
|
-
|
54
|
-
return returnPromise;
|
55
|
-
};
|
56
|
-
};
|
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 deleteThread(threadOrThreads, 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
|
+
if (!callback) {
|
15
|
+
callback = function (err) {
|
16
|
+
if (err) return rejectFunc(err);
|
17
|
+
resolveFunc();
|
18
|
+
};
|
19
|
+
}
|
20
|
+
|
21
|
+
var form = {
|
22
|
+
client: "mercury"
|
23
|
+
};
|
24
|
+
|
25
|
+
if (utils.getType(threadOrThreads) !== "Array") threadOrThreads = [threadOrThreads];
|
26
|
+
for (var i = 0; i < threadOrThreads.length; i++) form["ids[" + i + "]"] = threadOrThreads[i];
|
27
|
+
|
28
|
+
defaultFuncs
|
29
|
+
.post("https://www.facebook.com/ajax/mercury/delete_thread.php", ctx.jar, form)
|
30
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
31
|
+
.then(function (resData) {
|
32
|
+
if (resData.error) throw resData;
|
33
|
+
return callback();
|
34
|
+
})
|
35
|
+
.catch(function (err) {
|
36
|
+
log.error("deleteThread", err);
|
37
|
+
return callback(err);
|
38
|
+
});
|
39
|
+
|
40
|
+
return returnPromise;
|
41
|
+
};
|
42
|
+
};
|
@@ -1,60 +1,47 @@
|
|
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 forwardAttachment(attachmentID, userOrUsers, 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
|
-
if (!callback) {
|
15
|
-
callback = function(err) {
|
16
|
-
if (err)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
var
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
.
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
throw resData;
|
49
|
-
}
|
50
|
-
|
51
|
-
return callback();
|
52
|
-
})
|
53
|
-
.catch(function(err) {
|
54
|
-
log.error("forwardAttachment", err);
|
55
|
-
return callback(err);
|
56
|
-
});
|
57
|
-
|
58
|
-
return returnPromise;
|
59
|
-
};
|
60
|
-
};
|
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 forwardAttachment(attachmentID, userOrUsers, 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
|
+
if (!callback) {
|
15
|
+
callback = function (err) {
|
16
|
+
if (err) return rejectFunc(err);
|
17
|
+
resolveFunc();
|
18
|
+
};
|
19
|
+
}
|
20
|
+
|
21
|
+
var form = {
|
22
|
+
attachment_id: attachmentID
|
23
|
+
};
|
24
|
+
|
25
|
+
if (utils.getType(userOrUsers) !== "Array") userOrUsers = [userOrUsers];
|
26
|
+
|
27
|
+
var timestamp = Math.floor(Date.now() / 1000);
|
28
|
+
|
29
|
+
//That's good, the key of the array is really timestmap in seconds + index
|
30
|
+
//Probably time when the attachment will be sent?
|
31
|
+
for (var i = 0; i < userOrUsers.length; i++) form["recipient_map[" + (timestamp + i) + "]"] = userOrUsers[i];
|
32
|
+
|
33
|
+
defaultFuncs
|
34
|
+
.post("https://www.facebook.com/mercury/attachments/forward/", ctx.jar, form)
|
35
|
+
.then(utils.parseAndCheckLogin(ctx.jar, defaultFuncs))
|
36
|
+
.then(function (resData) {
|
37
|
+
if (resData.error) throw resData;
|
38
|
+
return callback();
|
39
|
+
})
|
40
|
+
.catch(function (err) {
|
41
|
+
log.error("forwardAttachment", err);
|
42
|
+
return callback(err);
|
43
|
+
});
|
44
|
+
|
45
|
+
return returnPromise;
|
46
|
+
};
|
47
|
+
};
|
File without changes
|
@@ -1,7 +1,7 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
module.exports = function(defaultFuncs, api, ctx) {
|
4
|
-
return function getCurrentUserID() {
|
5
|
-
return ctx.userID;
|
6
|
-
};
|
7
|
-
};
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
module.exports = function (defaultFuncs, api, ctx) {
|
4
|
+
return function getCurrentUserID() {
|
5
|
+
return ctx.userID;
|
6
|
+
};
|
7
|
+
};
|