Update users.go

Added functions for First and Last names
This commit is contained in:
AlexanderShK 2023-12-08 14:06:51 +03:00 committed by GitHub
parent 392ee8f57b
commit 1addf9fca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,22 @@ func (m *Client) GetNickName(userID string) string {
return ""
}
func (m *Client) GetFirstName(userID string) string {
if user := m.GetUser(userID); user != nil {
return user.FirstName
}
return ""
}
func (m *Client) GetLastName(userID string) string {
if user := m.GetUser(userID); user != nil {
return user.LastName
}
return ""
}
func (m *Client) GetStatus(userID string) string {
res, _, err := m.Client.GetUserStatus(userID, "")
if err != nil {