Merge pull request #610 from Cyberboss/VariousFixes

Some chat fixes
This commit is contained in:
Jordan Brown
2018-09-08 12:26:43 -04:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
@@ -180,7 +180,7 @@ namespace Tgstation.Server.Host.Controllers
if (model == null)
throw new ArgumentNullException(nameof(model));
if (!model.ValidateProviderChannelTypes())
if (model.Provider.HasValue && !model.ValidateProviderChannelTypes())
return BadRequest(new ErrorMessage { Message = "One or more of channels aren't formatted correctly for the given provider!" });
var query = DatabaseContext.ChatBots.Where(x => x.InstanceId == Instance.Id && x.Id == model.Id).Include(x => x.Channels);
@@ -29,6 +29,7 @@ namespace Tgstation.Server.Host.Models
DiscordChannelId = DiscordChannelId,
IsAdminChannel = IsAdminChannel,
IsWatchdogChannel = IsWatchdogChannel,
IsUpdatesChannel = IsUpdatesChannel,
IrcChannel = IrcChannel
};
}