decord/source/modules/channel/ChannelPinningExperiment.tsx

27 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 11814
// Function ID: 91678
2026-07-20 16:05:17 +00:00
// Name: useCanPinChannelsInGuild
2026-07-25 08:10:48 +00:00
// Dependencies: [1428, 5761, 2]
2026-07-20 16:05:17 +00:00
// Exports: useCanPinChannelsInGuild
2026-07-25 08:10:48 +00:00
// Module 11814 (useCanPinChannelsInGuild)
2026-07-23 10:11:24 +00:00
import ApexExperiment from "ApexExperiment";
let obj = { name: "2026-04-channel-pinning", kind: "user", defaultConfig: { canPinEverywhere: false }, variations: { [1]: { canPinEverywhere: true } } };
let closure_2 = ApexExperiment.createApexExperiment(obj);
const result = require("set").fileFinishedImporting("modules/channel/ChannelPinningExperiment.tsx");
2026-07-20 16:05:17 +00:00
export const useCanPinChannelsInGuild = function useCanPinChannelsInGuild(guild_id) {
2026-07-25 08:10:48 +00:00
let obj = require(5761) /* useOptInEnabledForGuild */;
2026-07-20 16:05:17 +00:00
const optInEnabledForGuild = obj.useOptInEnabledForGuild(guild_id);
const canPinEverywhere = closure_2.useConfig({ location: "useCanPinChannelsInGuild" }).canPinEverywhere;
obj = {};
let tmp2 = optInEnabledForGuild;
if (!optInEnabledForGuild) {
tmp2 = canPinEverywhere;
}
obj.canPin = tmp2;
obj.pinningNewlyAvailable = !optInEnabledForGuild && canPinEverywhere;
return obj;
};