Fixed sync checks failing for private channels

This commit is contained in:
RogueException
2016-07-14 22:42:50 -03:00
parent 07fa652488
commit ffc43260c5

View File

@@ -963,7 +963,7 @@ namespace Discord
var channel = DataStore.GetChannel(data.ChannelId) as ICachedMessageChannel;
if (channel != null)
{
if (!(channel as ICachedGuildChannel)?.Guild.IsSynced ?? true)
if (!((channel as ICachedGuildChannel)?.Guild.IsSynced ?? true))
{
await _gatewayLogger.DebugAsync("Ignored MESSAGE_CREATE, guild is not synced yet.").ConfigureAwait(false);
return;
@@ -997,7 +997,7 @@ namespace Discord
var channel = DataStore.GetChannel(data.ChannelId) as ICachedMessageChannel;
if (channel != null)
{
if (!(channel as ICachedGuildChannel)?.Guild.IsSynced ?? true)
if (!((channel as ICachedGuildChannel)?.Guild.IsSynced ?? true))
{
await _gatewayLogger.DebugAsync("Ignored MESSAGE_UPDATE, guild is not synced yet.").ConfigureAwait(false);
return;
@@ -1036,7 +1036,7 @@ namespace Discord
var channel = DataStore.GetChannel(data.ChannelId) as ICachedMessageChannel;
if (channel != null)
{
if (!(channel as ICachedGuildChannel)?.Guild.IsSynced ?? true)
if (!((channel as ICachedGuildChannel)?.Guild.IsSynced ?? true))
{
await _gatewayLogger.DebugAsync("Ignored MESSAGE_DELETE, guild is not synced yet.").ConfigureAwait(false);
return;
@@ -1063,7 +1063,7 @@ namespace Discord
var channel = DataStore.GetChannel(data.ChannelId) as ICachedMessageChannel;
if (channel != null)
{
if (!(channel as ICachedGuildChannel)?.Guild.IsSynced ?? true)
if (!((channel as ICachedGuildChannel)?.Guild.IsSynced ?? true))
{
await _gatewayLogger.DebugAsync("Ignored MESSAGE_DELETE_BULK, guild is not synced yet.").ConfigureAwait(false);
return;
@@ -1138,7 +1138,7 @@ namespace Discord
var channel = DataStore.GetChannel(data.ChannelId) as ICachedMessageChannel;
if (channel != null)
{
if (!(channel as ICachedGuildChannel)?.Guild.IsSynced ?? true)
if (!((channel as ICachedGuildChannel)?.Guild.IsSynced ?? true))
{
await _gatewayLogger.DebugAsync("Ignored TYPING_START, guild is not synced yet.").ConfigureAwait(false);
return;