@@ -22,6 +22,7 @@ type ExternalAPIUser struct {
|
||||
Scopes []string `json:"scopes"`
|
||||
Type string `json:"type,omitempty"` // Should be API
|
||||
LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`
|
||||
IsBot bool `json:"isBot"`
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -240,6 +241,7 @@ func makeExternalAPIUsersFromRows(rows *sql.Rows) ([]ExternalAPIUser, error) {
|
||||
CreatedAt: createdAt,
|
||||
Scopes: strings.Split(scopes, ","),
|
||||
LastUsedAt: lastUsedAt,
|
||||
IsBot: true,
|
||||
}
|
||||
integrations = append(integrations, integration)
|
||||
}
|
||||
|
||||
@@ -16,8 +16,10 @@ import (
|
||||
|
||||
var _datastore *data.Datastore
|
||||
|
||||
const moderatorScopeKey = "MODERATOR"
|
||||
const minSuggestedUsernamePoolLength = 10
|
||||
const (
|
||||
moderatorScopeKey = "MODERATOR"
|
||||
minSuggestedUsernamePoolLength = 10
|
||||
)
|
||||
|
||||
// User represents a single chat user.
|
||||
type User struct {
|
||||
@@ -29,7 +31,8 @@ type User struct {
|
||||
DisabledAt *time.Time `json:"disabledAt,omitempty"`
|
||||
PreviousNames []string `json:"previousNames"`
|
||||
NameChangedAt *time.Time `json:"nameChangedAt,omitempty"`
|
||||
Scopes []string `json:"scopes"`
|
||||
Scopes []string `json:"scopes,omitempty"`
|
||||
IsBot bool `json:"isBot"`
|
||||
}
|
||||
|
||||
// IsEnabled will return if this single user is enabled.
|
||||
|
||||
Reference in New Issue
Block a user