From 1addf9fca7a35f769fb41988d341d56fe11b09e5 Mon Sep 17 00:00:00 2001 From: AlexanderShK <113863493+AlexanderShK@users.noreply.github.com> Date: Fri, 8 Dec 2023 14:06:51 +0300 Subject: [PATCH] Update users.go Added functions for First and Last names --- .../matterbridge/matterclient/users.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vendor/github.com/matterbridge/matterclient/users.go b/vendor/github.com/matterbridge/matterclient/users.go index 30ea51a2..93e6bd70 100644 --- a/vendor/github.com/matterbridge/matterclient/users.go +++ b/vendor/github.com/matterbridge/matterclient/users.go @@ -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 {