Send inner circle status as VIP to BareRTC

face-detect
Noah Petherbridge 2023-09-03 12:08:45 -07:00
parent 6b0246edad
commit b619e0c02e
1 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import (
type Claims struct {
// Custom claims.
IsAdmin bool `json:"op,omitempty"`
VIP bool `json:"vip,omitempty"`
Avatar string `json:"img,omitempty"`
ProfileURL string `json:"url,omitempty"`
Nickname string `json:"nick,omitempty"`
@ -115,6 +116,7 @@ func Landing() http.HandlerFunc {
// Create the JWT claims.
claims := Claims{
IsAdmin: currentUser.HasAdminScope(config.ScopeChatModerator),
VIP: currentUser.IsInnerCircle(),
Avatar: avatar,
ProfileURL: "/u/" + currentUser.Username,
Nickname: currentUser.NameOrUsername(),