From b619e0c02e4e320aa4dfd29ff03492006f707759 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Sun, 3 Sep 2023 12:08:45 -0700 Subject: [PATCH] Send inner circle status as VIP to BareRTC --- pkg/controller/chat/chat.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/controller/chat/chat.go b/pkg/controller/chat/chat.go index a9aa0f7..9082e32 100644 --- a/pkg/controller/chat/chat.go +++ b/pkg/controller/chat/chat.go @@ -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(),