69 lines
4.4 KiB
TypeScript
69 lines
4.4 KiB
TypeScript
/* Metro module 9830; source: modules/messages/useReactionPermissions.tsx; dependencies: [57, 3785, 1945, 4798, 3784, 661, 566, 3790, 8229, 6860, 9831, 2] */
|
|
function _fun76994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10016:6, offset: 0x01dec7f1, size: 204 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
|
|
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
|
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
|
|
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
|
const env0_8 = (require(661) /* metro dependency 661: Constants */).Permissions;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/useReactionPermissions.tsx');
|
|
exports.default = useReactionPermissions;
|
|
}
|
|
|
|
function useReactionPermissions(a0) { // fn#76995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10016:256, offset: 0x01dec8bd, size: 464 bytes, params: 2, frame: 26
|
|
var r0;
|
|
const env0_0 = a0;
|
|
const guild_id = a0?.guild_id;
|
|
const fluxModule = require(566) /* metro dependency 566: flux */;
|
|
let useStateFromStores = fluxModule.useStateFromStores;
|
|
let object = [GuildVerificationStore];
|
|
const value3 = Reflect.apply(useStateFromStores, fluxModule, [object, _fun76996, [guild_id]]);
|
|
const value4 = fluxModule.useStateFromStores([LurkingStore], _fun76997, [guild_id]);
|
|
const value5 = fluxModule.useStateFromStores([GuildMemberStore], _fun76998, [guild_id]);
|
|
const moduleValue4 = fluxModule;
|
|
useStateFromStores = moduleValue4.useStateFromStores;
|
|
if (a0 == null) {
|
|
r0 = {'disableReactionReads': true, 'disableReactionCreates': true, 'disableReactionUpdates': true,
|
|
'isLurking': false, 'isGuest': false, 'isPendingMember': false};
|
|
} else {
|
|
object = {};
|
|
copyDataProperties(object,
|
|
(importDefault(9831) /* metro dependency 9831: parseReactionPermissions */)({channel: a0,
|
|
canChat: value3, renderReactions: true, canAddNewReactions: Reflect.apply(useStateFromStores, moduleValue4,
|
|
[[PermissionStore], _fun76999, [value3, a0]]), isLurking: value4,
|
|
communicationDisabled: env0_3((require(8229) /* metro dependency 8229: useUserCommunicationDisabled */).useCurrentUserCommunicationDisabled(guild_id),
|
|
|
|
2)[1],
|
|
isActiveChannelOrUnarchivableThread: (require(6860) /* metro dependency 6860: ThreadHooks */).useIsActiveChannelOrUnarchivableThread(a0),
|
|
|
|
isAutomodQuarantined: (require(3790) /* metro dependency 3790: AutomodPermissionUtils */).useCurrentUserAutomodQuaratinedProfile(guild_id)}),
|
|
|
|
undefined);
|
|
object['isLurking'] = value4;
|
|
object['isGuest'] = value5;
|
|
object['isPendingMember'] = false;
|
|
r0 = object;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun76996() { // fn#76996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10016:357, offset: 0x01deca8d, size: 40 bytes, params: 1, frame: 12
|
|
return guild_id == null || GuildVerificationStore.canChatInGuild(guild_id);
|
|
}
|
|
|
|
function _fun76997() { // fn#76997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10016:430, offset: 0x01decab5, size: 40 bytes, params: 1, frame: 12
|
|
return guild_id != null && LurkingStore.isLurking(guild_id);
|
|
}
|
|
|
|
function _fun76998() { // fn#76998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10016:498, offset: 0x01decadd, size: 40 bytes, params: 1, frame: 12
|
|
return guild_id != null && GuildMemberStore.isCurrentUserGuest(guild_id);
|
|
}
|
|
|
|
function _fun76999() { // fn#76999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10016:575, offset: 0x01decb05, size: 45 bytes, params: 1, frame: 14
|
|
return env0_2 && PermissionStore.can(Permissions.ADD_REACTIONS, env0_0);
|
|
}
|
|
|