Added 100 result limit to friendlist query

This commit is contained in:
Jonathan Barrow 2023-04-01 10:41:08 -04:00
parent 598a75f37d
commit b110b38edf
No known key found for this signature in database
GPG Key ID: E86E9FE9049C741F

View File

@ -15,7 +15,7 @@ import (
func GetUserFriendList(pid uint32) []*nexproto.FriendInfo {
friendList := make([]*nexproto.FriendInfo, 0)
rows, err := database.Postgres.Query(`SELECT user2_pid, date FROM wiiu.friendships WHERE user1_pid=$1 AND active=true`, pid)
rows, err := database.Postgres.Query(`SELECT user2_pid, date FROM wiiu.friendships WHERE user1_pid=$1 AND active=true LIMIT 100`, pid)
if err != nil {
globals.Logger.Critical(err.Error())
return friendList