Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Fix some issues around listing tournaments. - Fix an issue that would prevent the insertion of a record in a tournament with no scheduled reset and end time. - Ensure the devconsole applies user password updates even if no other fields change. - Fix third-party authentication ids not getting returned if queried through the friends graph. ## [2.14.1] - 2020-11-02 ### Added Loading server/core_friend.go +29 −14 Original line number Diff line number Diff line Loading @@ -110,7 +110,8 @@ func ListFriends(ctx context.Context, logger *zap.Logger, db *sql.DB, tracker Tr query := ` SELECT id, username, display_name, avatar_url, lang_tag, location, timezone, metadata, create_time, users.update_time, user_edge.update_time, state, position create_time, users.update_time, user_edge.update_time, state, position, facebook_id, google_id, gamecenter_id, steam_id, facebook_instant_game_id, apple_id FROM users, user_edge WHERE id = destination_id AND source_id = $1` params = append(params, userID) if state != nil { Loading Loading @@ -156,8 +157,16 @@ FROM users, user_edge WHERE id = destination_id AND source_id = $1` var edgeUpdateTime pgtype.Timestamptz var state sql.NullInt64 var position sql.NullInt64 if err = rows.Scan(&id, &username, &displayName, &avatarURL, &lang, &location, &timezone, &metadata, &createTime, &updateTime, &edgeUpdateTime, &state, &position); err != nil { var facebookID sql.NullString var googleID sql.NullString var gamecenterID sql.NullString var steamID sql.NullString var facebookInstantGameID sql.NullString var appleID sql.NullString if err = rows.Scan(&id, &username, &displayName, &avatarURL, &lang, &location, &timezone, &metadata, &createTime, &updateTime, &edgeUpdateTime, &state, &position, &facebookID, &googleID, &gamecenterID, &steamID, &facebookInstantGameID, &appleID); err != nil { logger.Error("Error retrieving friends.", zap.Error(err)) return nil, err } Loading Loading @@ -190,6 +199,12 @@ FROM users, user_edge WHERE id = destination_id AND source_id = $1` CreateTime: ×tamp.Timestamp{Seconds: createTime.Time.Unix()}, UpdateTime: ×tamp.Timestamp{Seconds: updateTime.Time.Unix()}, Online: online, FacebookId: facebookID.String, GoogleId: googleID.String, GamecenterId: gamecenterID.String, SteamId: steamID.String, FacebookInstantGameId: facebookInstantGameID.String, AppleId: appleID.String, } friends = append(friends, &api.Friend{ Loading Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Fix some issues around listing tournaments. - Fix an issue that would prevent the insertion of a record in a tournament with no scheduled reset and end time. - Ensure the devconsole applies user password updates even if no other fields change. - Fix third-party authentication ids not getting returned if queried through the friends graph. ## [2.14.1] - 2020-11-02 ### Added Loading
server/core_friend.go +29 −14 Original line number Diff line number Diff line Loading @@ -110,7 +110,8 @@ func ListFriends(ctx context.Context, logger *zap.Logger, db *sql.DB, tracker Tr query := ` SELECT id, username, display_name, avatar_url, lang_tag, location, timezone, metadata, create_time, users.update_time, user_edge.update_time, state, position create_time, users.update_time, user_edge.update_time, state, position, facebook_id, google_id, gamecenter_id, steam_id, facebook_instant_game_id, apple_id FROM users, user_edge WHERE id = destination_id AND source_id = $1` params = append(params, userID) if state != nil { Loading Loading @@ -156,8 +157,16 @@ FROM users, user_edge WHERE id = destination_id AND source_id = $1` var edgeUpdateTime pgtype.Timestamptz var state sql.NullInt64 var position sql.NullInt64 if err = rows.Scan(&id, &username, &displayName, &avatarURL, &lang, &location, &timezone, &metadata, &createTime, &updateTime, &edgeUpdateTime, &state, &position); err != nil { var facebookID sql.NullString var googleID sql.NullString var gamecenterID sql.NullString var steamID sql.NullString var facebookInstantGameID sql.NullString var appleID sql.NullString if err = rows.Scan(&id, &username, &displayName, &avatarURL, &lang, &location, &timezone, &metadata, &createTime, &updateTime, &edgeUpdateTime, &state, &position, &facebookID, &googleID, &gamecenterID, &steamID, &facebookInstantGameID, &appleID); err != nil { logger.Error("Error retrieving friends.", zap.Error(err)) return nil, err } Loading Loading @@ -190,6 +199,12 @@ FROM users, user_edge WHERE id = destination_id AND source_id = $1` CreateTime: ×tamp.Timestamp{Seconds: createTime.Time.Unix()}, UpdateTime: ×tamp.Timestamp{Seconds: updateTime.Time.Unix()}, Online: online, FacebookId: facebookID.String, GoogleId: googleID.String, GamecenterId: gamecenterID.String, SteamId: steamID.String, FacebookInstantGameId: facebookInstantGameID.String, AppleId: appleID.String, } friends = append(friends, &api.Friend{ Loading