Send inner circle status as VIP to BareRTC
This commit is contained in:
parent
6b0246edad
commit
b619e0c02e
|
@ -25,6 +25,7 @@ import (
|
||||||
type Claims struct {
|
type Claims struct {
|
||||||
// Custom claims.
|
// Custom claims.
|
||||||
IsAdmin bool `json:"op,omitempty"`
|
IsAdmin bool `json:"op,omitempty"`
|
||||||
|
VIP bool `json:"vip,omitempty"`
|
||||||
Avatar string `json:"img,omitempty"`
|
Avatar string `json:"img,omitempty"`
|
||||||
ProfileURL string `json:"url,omitempty"`
|
ProfileURL string `json:"url,omitempty"`
|
||||||
Nickname string `json:"nick,omitempty"`
|
Nickname string `json:"nick,omitempty"`
|
||||||
|
@ -115,6 +116,7 @@ func Landing() http.HandlerFunc {
|
||||||
// Create the JWT claims.
|
// Create the JWT claims.
|
||||||
claims := Claims{
|
claims := Claims{
|
||||||
IsAdmin: currentUser.HasAdminScope(config.ScopeChatModerator),
|
IsAdmin: currentUser.HasAdminScope(config.ScopeChatModerator),
|
||||||
|
VIP: currentUser.IsInnerCircle(),
|
||||||
Avatar: avatar,
|
Avatar: avatar,
|
||||||
ProfileURL: "/u/" + currentUser.Username,
|
ProfileURL: "/u/" + currentUser.Username,
|
||||||
Nickname: currentUser.NameOrUsername(),
|
Nickname: currentUser.NameOrUsername(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user