fix user profile

This commit is contained in:
Jicheng Lu 2024-05-31 11:26:23 -05:00
parent 974a86cb66
commit efb650d92a

View file

@ -206,7 +206,12 @@ public class UserService : IUserService
{
var db = _services.GetRequiredService<IBotSharpRepository>();
User user = default;
if (_user.UserName != null)
if (_user.Id != null)
{
user = db.GetUserById(_user.Id);
}
else if (_user.UserName != null)
{
user = db.GetUserByUserName(_user.UserName);
}