Merge pull request #705 from Cyberboss/MoreDiscordBS

Fix chat mapping IDs
This commit is contained in:
Jordan Brown
2018-09-22 14:50:54 -04:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
@@ -207,6 +207,7 @@ namespace Tgstation.Server.Host.Components.Chat
{
//need to add tag and isAdminChannel
var mapping = enumerable.First().Value;
message.User.Channel.Id = mapping.Channel.Id;
message.User.Channel.Tag = mapping.Channel.Tag;
message.User.Channel.IsAdmin = mapping.Channel.IsAdmin;
}
@@ -182,7 +182,7 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
};
};
var enumerator = channels.Select(x => GetChannelForChatChannel(x)).Where(x => x != null);
var enumerator = channels.Select(x => GetChannelForChatChannel(x)).Where(x => x != null).ToList();
lock (this)
{
@@ -190,7 +190,7 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
mappedChannels.AddRange(enumerator.Select(x => x.RealId));
}
return Task.FromResult<IReadOnlyList<Channel>>(enumerator.ToList());
return Task.FromResult<IReadOnlyList<Channel>>(enumerator);
}
/// <inheritdoc />