Timezones: something something isdm

This commit is contained in:
thororen1234 2026-07-11 14:31:23 -04:00
parent 5b474e9818
commit 82bc3356ea
No known key found for this signature in database

View file

@ -364,10 +364,14 @@ export default definePlugin({
let userId = props.message.author.id;
if (userId === UserStore.getCurrentUser().id) {
if (!showOwnTimezone && !recipientTimezoneInDms) return null;
const channel = ChannelStore.getChannel(props.message.channel_id);
if (recipientTimezoneInDms) userId = channel?.getRecipientId() ?? userId;
const recipientId = channel?.isDM() ? channel.getRecipientId() : null;
if (recipientTimezoneInDms && recipientId) {
userId = recipientId;
} else if (!showOwnTimezone) {
return null;
}
}
return <TimestampComponent userId={userId} timestamp={props.message.timestamp.toISOString()} type="message" />;