41 lines
980 B
TypeScript
41 lines
980 B
TypeScript
// Metro module 5979 (f5980).
|
|
import AuthenticationStore from "../../../../stores/AuthenticationStore";
|
|
import { LinkType } from "../MessageEmbedConstants";
|
|
export function trackingConfigWithDefaults(a0) {
|
|
let id = a0?.id;
|
|
if (id == null) {
|
|
id = "0";
|
|
}
|
|
let linkType = a0?.linkType;
|
|
if (linkType == null) {
|
|
linkType = LinkType.UNKNOWN;
|
|
}
|
|
let referrerId = a0?.referrerId;
|
|
if (referrerId == null) {
|
|
referrerId = AuthenticationStore.getId();
|
|
}
|
|
const activityCustomId = a0?.activityCustomId;
|
|
const onView = a0?.onView;
|
|
const onLinkCopied = a0?.onLinkCopied;
|
|
const guildId = a0?.guildId;
|
|
const channelId = a0?.channelId;
|
|
const messageId = a0?.messageId;
|
|
let isDeadEnd = a0?.isDeadEnd;
|
|
if (isDeadEnd == null) {
|
|
isDeadEnd = false;
|
|
}
|
|
return {
|
|
id,
|
|
linkType,
|
|
referrerId,
|
|
activityCustomId,
|
|
onView,
|
|
onLinkCopied,
|
|
guildId,
|
|
channelId,
|
|
messageId,
|
|
isDeadEnd,
|
|
appEmbedState: a0?.appEmbedState
|
|
};
|
|
}
|