From d0309db97f6ab10c308968dabc54e55c5c38c6bd Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Thu, 9 May 2019 16:49:02 +0200 Subject: [PATCH] types: add RemoteUserAvatarURL to User --- internal/services/gateway/api/user.go | 8 ++++++-- internal/services/types/types.go | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/internal/services/gateway/api/user.go b/internal/services/gateway/api/user.go index 1148ea8..8b5f09f 100644 --- a/internal/services/gateway/api/user.go +++ b/internal/services/gateway/api/user.go @@ -160,7 +160,9 @@ type UserResponse struct { } type LinkedAccountResponse struct { - RemoteSourceID string `json:"remote_source_id,omitempty"` + RemoteSourceID string `json:"remote_source_id"` + RemoteUserName string `json:"remote_user_name"` + RemoteUserAvatarURL string `json:"remote_user_avatar_url"` } func createUserResponse(u *types.User) *UserResponse { @@ -177,7 +179,9 @@ func createUserResponse(u *types.User) *UserResponse { for _, la := range u.LinkedAccounts { user.LinkedAccounts = append(user.LinkedAccounts, &LinkedAccountResponse{ - RemoteSourceID: la.RemoteSourceID, + RemoteSourceID: la.RemoteSourceID, + RemoteUserName: la.RemoteUserName, + RemoteUserAvatarURL: la.RemoteUserAvatarURL, }) } diff --git a/internal/services/types/types.go b/internal/services/types/types.go index 56b4d9e..83f22cf 100644 --- a/internal/services/types/types.go +++ b/internal/services/types/types.go @@ -206,8 +206,9 @@ type LinkedAccount struct { ID string `json:"id,omitempty"` - RemoteUserID string `json:"remote_user_id,omitempty"` - RemoteUserName string `json:"remote_username,omitempty"` + RemoteUserID string `json:"remote_user_id,omitempty"` + RemoteUserName string `json:"remote_username,omitempty"` + RemoteUserAvatarURL string `json:"remote_user_avatar_url,omitempty"` RemoteSourceID string `json:"remote_source_id,omitempty"`