This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
// Metro module 4253 (f4254).
import _slicedToArray from "../../../_bundle/_slicedToArray";
import { StreamTypes } from "../Constants";
export function isStreamKey(a0) {
return a0 != null && (a0.startsWith(StreamTypes.GUILD) || a0.startsWith(StreamTypes.CALL));
}
export function decodeStreamKey(a0) {
const r11 = a0.split(":");
const r7 = r11[0];
if (StreamTypes.GUILD === r7) {
const r31 = _slicedToArray(r11, 4);
return {
streamType: r31[0],
guildId: r31[1],
channelId: r31[2],
ownerId: r31[3]
};
}
if (StreamTypes.CALL === r7) {
const r23 = _slicedToArray(r11, 3);
return {
streamType: r23[0],
channelId: r23[1],
ownerId: r23[2]
};
}
throw new Error(`Unknown stream type ${r7}`);
}
export function encodeStreamKey({ streamType, guildId, channelId, ownerId }) {
if (StreamTypes.GUILD === streamType) {
return [streamType, guildId, channelId, ownerId].join(":");
}
if (StreamTypes.CALL === streamType) {
return [streamType, channelId, ownerId].join(":");
}
throw new Error(`Unknown stream type ${streamType}`);
}