mirror of
https://github.com/PretendoNetwork/friends.git
synced 2026-04-21 17:17:25 -05:00
12 lines
479 B
Go
12 lines
479 B
Go
package database
|
|
|
|
import nexproto "github.com/PretendoNetwork/nex-protocols-go"
|
|
|
|
func GetUserPrincipalPreference(pid uint32) *nexproto.PrincipalPreference {
|
|
preference := nexproto.NewPrincipalPreference()
|
|
|
|
_ = cassandraClusterSession.Query(`SELECT show_online, show_current_game, block_friend_requests FROM pretendo_friends.preferences WHERE pid=?`, pid).Scan(&preference.ShowOnlinePresence, &preference.ShowCurrentTitle, &preference.BlockFriendRequests)
|
|
|
|
return preference
|
|
}
|