175 lines
6.5 KiB
TypeScript
175 lines
6.5 KiB
TypeScript
// Module ID: 12898
|
|
// Function ID: 12899
|
|
// Name: getAskToJoinText
|
|
// Dependencies: [1922, 676, 1236, 2855, 4673, 2]
|
|
// Exports: getDeadGameInviteText, getHeaderText, getPartyText, getRequestToStreamText
|
|
|
|
// Module 12898 (getAskToJoinText)
|
|
import getSystemLocale from "getSystemLocale" /* 1236 */;
|
|
import messagesProxyDefault from "messagesProxy" /* 2855 */;
|
|
import getNickname from "getNickname" /* 4673 */;
|
|
import closure_3 from "mergeGuildAvatar" /* 1922 */;
|
|
import { ActivityActionTypes } from "ME" /* 676 */;
|
|
|
|
require = arg1;
|
|
function getAskToJoinText(author, name_override, isPrivate, id1, arg4) {
|
|
if (author.author.id === id1) {
|
|
if (isPrivate.isPrivate()) {
|
|
user = user.getUser(isPrivate.getRecipientId());
|
|
if (null != user) {
|
|
const intl2 = getSystemLocale.intl;
|
|
const formatToPlainString2 = intl2.formatToPlainString;
|
|
const t2 = getSystemLocale.t;
|
|
if (arg4) {
|
|
let obj = { username: null, appName: null };
|
|
obj[0] = user.globalName;
|
|
obj[1] = name_override;
|
|
let formatToPlainString2Result = formatToPlainString2(t2.JddpN2, obj);
|
|
} else {
|
|
obj = { username: null, appName: null };
|
|
obj[0] = user.globalName;
|
|
obj[1] = name_override;
|
|
formatToPlainString2Result = formatToPlainString2(t2.gYVkSW, obj);
|
|
}
|
|
return formatToPlainString2Result;
|
|
}
|
|
}
|
|
const intl = getSystemLocale.intl;
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
const t = getSystemLocale.t;
|
|
if (arg4) {
|
|
obj1 = { appName: null };
|
|
obj1[0] = name_override;
|
|
let formatToPlainStringResult = formatToPlainString(t["2N1kNS"], obj1);
|
|
} else {
|
|
const obj2 = { appName: null };
|
|
obj2[0] = name_override;
|
|
formatToPlainStringResult = formatToPlainString(t.IA6uDV, obj2);
|
|
}
|
|
return formatToPlainStringResult;
|
|
} else {
|
|
const intl3 = getSystemLocale.intl;
|
|
const formatToPlainString3 = intl3.formatToPlainString;
|
|
const t3 = getSystemLocale.t;
|
|
if (arg4) {
|
|
const obj3 = { username: null, appName: null };
|
|
obj3[0] = author.author.globalName;
|
|
obj3[1] = name_override;
|
|
let formatToPlainString3Result = formatToPlainString3(t3.XE8axA, obj3);
|
|
} else {
|
|
obj = { username: null, appName: null };
|
|
obj[0] = author.author.globalName;
|
|
obj[1] = name_override;
|
|
formatToPlainString3Result = formatToPlainString3(t3.hgcjOn, obj);
|
|
}
|
|
return formatToPlainString3Result;
|
|
}
|
|
}
|
|
const result = require("set").fileFinishedImporting("modules/activities/utils/InviteEmbedTextUtils.tsx");
|
|
|
|
export const getHeaderText = function getHeaderText(arg0, arg1, arg2) {
|
|
if (ActivityActionTypes.LISTEN === arg1) {
|
|
const intl5 = getSystemLocale.intl;
|
|
let obj = { name: null };
|
|
obj[0] = arg0;
|
|
return intl5.formatToPlainString(getSystemLocale.t["/8czH4"], obj);
|
|
} else if (tmp.WATCH === arg1) {
|
|
const intl4 = getSystemLocale.intl;
|
|
obj = { name: null };
|
|
obj[0] = arg0;
|
|
return intl4.formatToPlainString(getSystemLocale.t.BBJXVk, obj);
|
|
} else if (tmp.JOIN === arg1) {
|
|
let stringResult;
|
|
if (!arg2) {
|
|
const intl3 = getSystemLocale.intl;
|
|
stringResult = intl3.string(getSystemLocale.t.pkq6Vq);
|
|
}
|
|
return stringResult;
|
|
} else if (tmp.STREAM_REQUEST === arg1) {
|
|
const intl2 = getSystemLocale.intl;
|
|
return intl2.string(messagesProxyDefault.DKHhec);
|
|
} else {
|
|
const JOIN_REQUEST = tmp.JOIN_REQUEST;
|
|
const intl = getSystemLocale.intl;
|
|
return intl.string(getSystemLocale.t.Ckxb6j);
|
|
}
|
|
};
|
|
export const getRequestToStreamText = function getRequestToStreamText(author, guild_id, id) {
|
|
if (author.author.id === id) {
|
|
const intl2 = getSystemLocale.intl;
|
|
let stringResult = intl2.string(messagesProxyDefault["8B3U5O"]);
|
|
} else {
|
|
const intl = getSystemLocale.intl;
|
|
const obj = { username: null };
|
|
obj[0] = getNickname.getName(guild_id.guild_id, guild_id.id, author.author);
|
|
stringResult = intl.formatToPlainString(messagesProxyDefault["d/qbC0"], obj);
|
|
const obj2 = getNickname;
|
|
}
|
|
return stringResult;
|
|
};
|
|
export { getAskToJoinText };
|
|
export const getDeadGameInviteText = function getDeadGameInviteText(activity, name_override, guild_id, id1, arg4) {
|
|
activity = activity.activity;
|
|
let type;
|
|
if (activity != null) {
|
|
type = activity.type;
|
|
}
|
|
if (ActivityActionTypes.LISTEN !== type) {
|
|
if (tmp2.WATCH !== type) {
|
|
if (tmp2.JOIN !== type) {
|
|
if (tmp2.STREAM_REQUEST === type) {
|
|
if (activity.author.id === id1) {
|
|
const intl2 = getSystemLocale.intl;
|
|
let stringResult = intl2.string(messagesProxyDefault["8B3U5O"]);
|
|
} else {
|
|
const intl = getSystemLocale.intl;
|
|
const obj = { username: null };
|
|
obj[0] = getNickname.getName(guild_id.guild_id, guild_id.id, activity.author);
|
|
stringResult = intl.formatToPlainString(messagesProxyDefault["d/qbC0"], obj);
|
|
const obj2 = getNickname;
|
|
}
|
|
return stringResult;
|
|
} else {
|
|
const JOIN_REQUEST = tmp2.JOIN_REQUEST;
|
|
return getAskToJoinText(activity, name_override, guild_id, id1, true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const intl3 = getSystemLocale.intl;
|
|
const t = getSystemLocale.t;
|
|
return intl3.string(arg4 ? t.x1UXGR : t["Ek+51n"]);
|
|
};
|
|
export const getPartyText = function getPartyText(arg0) {
|
|
({ activityActionType, maxPartySize, partySize } = arg0);
|
|
if (activityActionType === ActivityActionTypes.STREAM_REQUEST) {
|
|
return "";
|
|
} else {
|
|
if (activityActionType !== tmp.LISTEN) {
|
|
if (maxPartySize > 0) {
|
|
const intl2 = getSystemLocale.intl;
|
|
let obj = { partySize: null, maxPartySize: null };
|
|
obj[0] = partySize;
|
|
obj[1] = maxPartySize;
|
|
let formatToPlainStringResult = intl2.formatToPlainString(getSystemLocale.t.gLu7NU, obj);
|
|
} else {
|
|
const intl = getSystemLocale.intl;
|
|
obj = { partySize: null };
|
|
obj[0] = partySize;
|
|
formatToPlainStringResult = intl.formatToPlainString(getSystemLocale.t["65JnWC"], obj);
|
|
}
|
|
}
|
|
if (maxPartySize > 0) {
|
|
const intl4 = getSystemLocale.intl;
|
|
obj = { partySize: null, maxPartySize: null };
|
|
obj[0] = partySize;
|
|
obj[1] = maxPartySize;
|
|
let formatToPlainStringResult1 = intl4.formatToPlainString(getSystemLocale.t.Zogoou, obj);
|
|
} else {
|
|
const intl3 = getSystemLocale.intl;
|
|
obj1 = { partySize: null };
|
|
obj1[0] = partySize;
|
|
formatToPlainStringResult1 = intl3.formatToPlainString(getSystemLocale.t.UGei0j, obj1);
|
|
}
|
|
}
|
|
};
|