fix: get thread parent from API instead of cache for cross-cluster message edit
This commit is contained in:
parent
6a213fa694
commit
e0ed5b528e
@ -86,11 +86,14 @@ public class WebhookExecutorService
|
|||||||
};
|
};
|
||||||
|
|
||||||
ulong? threadId = null;
|
ulong? threadId = null;
|
||||||
var root = await _cache.GetRootChannel(channelId);
|
var channel = await _cache.GetOrFetchChannel(_rest, channelId);
|
||||||
if (root.Id != channelId)
|
if (channel.IsThread())
|
||||||
|
{
|
||||||
threadId = channelId;
|
threadId = channelId;
|
||||||
|
channelId = channel.ParentId.Value;
|
||||||
|
}
|
||||||
|
|
||||||
var webhook = await _webhookCache.GetWebhook(root.Id);
|
var webhook = await _webhookCache.GetWebhook(channelId);
|
||||||
|
|
||||||
return await _rest.EditWebhookMessage(webhook.Id, webhook.Token, messageId,
|
return await _rest.EditWebhookMessage(webhook.Id, webhook.Token, messageId,
|
||||||
new WebhookMessageEditRequest { Content = newContent, AllowedMentions = allowedMentions },
|
new WebhookMessageEditRequest { Content = newContent, AllowedMentions = allowedMentions },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user