From 6511c04c6c9652ad093993cc46b9560211620202 Mon Sep 17 00:00:00 2001 From: Ske Date: Sun, 5 Jun 2022 23:27:30 +0200 Subject: [PATCH] fix: don't fetch non-thread channels twice --- PluralKit.Bot/Proxy/ProxyService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.Bot/Proxy/ProxyService.cs b/PluralKit.Bot/Proxy/ProxyService.cs index e564d64f..e8a01301 100644 --- a/PluralKit.Bot/Proxy/ProxyService.cs +++ b/PluralKit.Bot/Proxy/ProxyService.cs @@ -215,7 +215,7 @@ public class ProxyService }; var messageChannel = await _rest.GetChannelOrNull(msg.Channel!); - var rootChannel = await _rest.GetChannelOrNull(messageChannel.IsThread() ? messageChannel.ParentId!.Value : messageChannel.Id); + var rootChannel = messageChannel.IsThread() ? await _rest.GetChannelOrNull(messageChannel.ParentId!.Value) : messageChannel; var threadId = messageChannel.IsThread() ? messageChannel.Id : (ulong?)null; var guild = await _rest.GetGuildOrNull(msg.Guild!.Value);