26 lines
847 B
TypeScript
26 lines
847 B
TypeScript
// Module ID: 11203
|
|
// Function ID: 11204
|
|
// Dependencies: [5171, 3989, 676, 2]
|
|
// Exports: default
|
|
|
|
// Module 11203
|
|
import recomputeGuild from "recomputeGuild";
|
|
import getUncachedChannelPermissions from "getUncachedChannelPermissions";
|
|
import { Permissions } from "ME";
|
|
|
|
const result = require("ME").fileFinishedImporting("modules/reactions/canAddNewReactions.tsx");
|
|
|
|
export default (getGuildId) => {
|
|
const guildId = getGuildId.getGuildId();
|
|
let canChatInGuildResult = null != guildId;
|
|
if (canChatInGuildResult) {
|
|
canChatInGuildResult = recomputeGuild.canChatInGuild(guildId);
|
|
}
|
|
if (canChatInGuildResult) {
|
|
canChatInGuildResult = getUncachedChannelPermissions.can(Permissions.ADD_REACTIONS, getGuildId);
|
|
}
|
|
if (!canChatInGuildResult) {
|
|
canChatInGuildResult = getGuildId.isPrivate();
|
|
}
|
|
return canChatInGuildResult;
|
|
};
|