mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-13 20:18:50 +03:00
send channel lazy load when loading thread if not previously sent
This commit is contained in:
@@ -476,9 +476,16 @@ void DiscordClient::SendLazyLoad(Snowflake id) {
|
||||
msg.ShouldGetThreads = true;
|
||||
|
||||
m_websocket.Send(msg);
|
||||
|
||||
m_channels_lazy_loaded.insert(id);
|
||||
}
|
||||
|
||||
void DiscordClient::SendThreadLazyLoad(Snowflake id) {
|
||||
auto thread = GetChannel(id);
|
||||
if (thread.has_value())
|
||||
if (m_channels_lazy_loaded.find(*thread->ParentID) == m_channels_lazy_loaded.end())
|
||||
SendLazyLoad(*thread->ParentID);
|
||||
|
||||
LazyLoadRequestMessage msg;
|
||||
msg.GuildID = *GetChannel(id)->GuildID;
|
||||
msg.ThreadIDs.emplace().push_back(id);
|
||||
|
||||
Reference in New Issue
Block a user