Make email in EditProfile optional if not being changed

This commit is contained in:
RogueException
2015-10-13 01:48:16 -03:00
parent c2b6bb9c34
commit d709bd60a8

View File

@@ -635,7 +635,7 @@ namespace Discord
{
if (currentPassword == null) throw new ArgumentNullException(nameof(currentPassword));
return _api.EditProfile(currentPassword: currentPassword, username: username, email: email, password: password,
return _api.EditProfile(currentPassword: currentPassword, username: username, email: email ?? _currentUser.Email, password: password,
avatarType: avatarType, avatar: avatar);
}