decord/source/modules/rpc/server/commands/relationships.tsx

76 lines
2.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 13924
// Function ID: 13925
2026-07-29 08:29:29 +00:00
// Name: items
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 4033, 1922, 4281, 676, 13909, 4379, 506, 8789, 8794, 2]
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
// Module 13924 (items)
import fromStringAll from "fromString" /* 506 */;
import prototypeDefault from "prototype" /* 8789 */;
import recurseReplaceContentTree from "recurseReplaceContentTree" /* 8794 */;
import closure_4 from "_slicedToArray" /* 32 */;
import closure_5 from "markAllUserIdListsStale" /* 4033 */;
import closure_6 from "mergeGuildAvatar" /* 1922 */;
import ME from "ME" /* 676 */;
import CONTEXT_MENU_ICON_NAMES from "CONTEXT_MENU_ICON_NAMES" /* 13909 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
({ ApplicationFlags: error, RelationshipTypes: closure_8, RPCCommands, RPCErrors: c9 } = ME);
2026-07-20 16:05:17 +00:00
let obj = {};
2026-07-29 08:29:29 +00:00
obj = { scope: null, handler: null };
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-23 10:11:24 +00:00
let items = [require("set").OAuth2Scopes.RELATIONSHIPS_READ];
obj[require("RPC_SCOPE_CONFIG").RPC_SCOPE_CONFIG.ANY] = items;
2026-07-29 08:29:29 +00:00
obj[0] = obj;
obj[1] = function handler(socket) {
2026-08-24 06:08:38 +00:00
let obj = fromStringAll;
2026-07-29 08:29:29 +00:00
let num = socket.socket.application.flags;
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const obj2 = fromStringAll;
2026-07-29 08:29:29 +00:00
const tmp = importAll;
2026-08-24 06:08:38 +00:00
const deserializeResult = fromStringAll.deserialize(num);
2026-07-29 08:29:29 +00:00
if (obj.has(deserializeResult, tmpResult.deserialize(constants.DISABLE_RELATIONSHIPS_ACCESS))) {
obj = { errorCode: null };
obj[0] = constants3.INVALID_PERMISSIONS;
2026-08-24 06:08:38 +00:00
const tmp34 = new prototypeDefault(obj, "Missing Permissions");
2026-07-29 08:29:29 +00:00
throw tmp34;
2026-07-20 16:05:17 +00:00
} else {
const items = [];
2026-07-23 10:11:24 +00:00
mutableRelationships = mutableRelationships.getMutableRelationships();
2026-07-29 08:29:29 +00:00
const entries = mutableRelationships.entries();
const tmp8 = entries[Symbol.iterator]();
while (tmp8 !== undefined) {
let tmp12 = callback;
let tmp13 = callback(tmp10, 2);
[tmp14, tmp15] = tmp13;
let tmp17 = constants2;
if (tmp15 !== constants2.NONE) {
let tmp18 = user;
let tmp19 = tmp14;
user = user.getUser(tmp14);
if (null != user) {
let tmp22 = require;
let tmp23 = dependencyMap;
let tmp24 = dependencyMap;
2026-08-24 06:08:38 +00:00
let obj5 = recurseReplaceContentTree;
2026-07-29 08:29:29 +00:00
let tmp25 = tmp15;
let tmp26 = user;
let result = obj5.transformBaseRelationship(tmp16, tmp21);
2026-08-24 06:08:38 +00:00
let obj6 = recurseReplaceContentTree;
2026-07-29 08:29:29 +00:00
let arr = items.push(obj6.transformApplicationRelationship(result, socket.socket.application.id));
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { relationships: null };
obj[0] = items;
2026-07-20 16:05:17 +00:00
return obj;
}
2026-08-24 06:08:38 +00:00
tmpResult = fromStringAll;
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
obj[RPCCommands.GET_RELATIONSHIPS] = CONTEXT_MENU_ICON_NAMES.createRPCCommand(RPCCommands.GET_RELATIONSHIPS, obj);
let result = require("set").fileFinishedImporting("modules/rpc/server/commands/relationships.tsx");
2026-07-20 16:05:17 +00:00
export default obj;