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

+35
View File
@@ -0,0 +1,35 @@
// Metro module 12023 (f12024).
import UserStore from "../../stores/UserStore";
import { ChannelTypes } from "../../Constants";
import { isNotNullish } from "../../utils/GlobalUtils";
import AvatarUtils from "../../utils/AvatarUtils";
export function getChannelIconURL(a0, size = 32) {
const type = a0.type;
if (ChannelTypes.DM === type) {
const [r35] = a0.recipients.map(UserStore.getUser).filter(isNotNullish);
return r35 != null ? r35.getAvatarURL(void 0, size, arguments[2]) : null;
}
if (ChannelTypes.GROUP_DM === type) {
return AvatarUtils.getChannelIconURL({
id: a0.id,
icon: a0.icon,
applicationId: a0.getApplicationId(),
size
});
}
}
export function getChannelIconSource(a0) {
const type = a0.type;
if (ChannelTypes.DM === type) {
const [r36] = a0.recipients.map(UserStore.getUser).filter(isNotNullish);
return r36 != null ? r36.getAvatarSource(void 0) : null;
}
if (ChannelTypes.GROUP_DM === type) {
return AvatarUtils.getChannelIconSource({
id: a0.id,
icon: a0.icon,
applicationId: a0.getApplicationId(),
size: 128
});
}
}