aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-28 00:27:36 -0800
committerFChannel <=>2021-01-28 00:27:36 -0800
commitfaee9db270a22a42e45210529c7998dcede0087b (patch)
tree4b3c90b197f8a784e8ce3c57e6e57d4b423e83e8 /client.go
parentc171ea82b48f9b2f5c9b8132755e4fb8545290d9 (diff)
added red board layout
Diffstat (limited to 'client.go')
-rw-r--r--client.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/client.go b/client.go
index 98bb278..d84561e 100644
--- a/client.go
+++ b/client.go
@@ -32,6 +32,7 @@ type Board struct{
ModCred string
Domain string
TP string
+ Restricted bool
}
type PageData struct {
@@ -84,6 +85,7 @@ func IndexGet(w http.ResponseWriter, r *http.Request, db *sql.DB) {
board.PrefName = boardActor.PreferredUsername
board.Location = "/" + boardActor.Name
boardCollection = append(boardCollection, board)
+ board.Restricted = boardActor.Restricted
}
var data PageData
@@ -118,6 +120,7 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co
returnData.Board.Actor = actor.Id
returnData.Board.ModCred, _ = GetPasswordFromSession(r)
returnData.Board.Domain = Domain
+ returnData.Board.Restricted = actor.Restricted
returnData.CurrentPage = page
returnData.Board.Captcha = GetCaptcha(*actor)
@@ -239,6 +242,7 @@ func CatalogGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection C
returnData.Board.Summary = actor.Summary
returnData.Board.ModCred, _ = GetPasswordFromSession(r)
returnData.Board.Domain = Domain
+ returnData.Board.Restricted = actor.Restricted
returnData.Key = *Key
returnData.Board.Captcha = GetCaptcha(*actor)
@@ -272,7 +276,8 @@ func PostGet(w http.ResponseWriter, r *http.Request, db *sql.DB){
returnData.Board.Actor = actor.Id
returnData.Board.Summary = actor.Summary
returnData.Board.ModCred, _ = GetPasswordFromSession(r)
- returnData.Board.Domain = Domain
+ returnData.Board.Domain = Domain
+ returnData.Board.Restricted = actor.Restricted
if GetDomainURL(actor) != "" {