if it's not our honk, don't show controls

This commit is contained in:
Ted Unangst 2019-07-09 23:31:57 -04:00
parent 9df8218fdf
commit 998c59d623
1 changed files with 4 additions and 1 deletions

View File

@ -598,8 +598,11 @@ func showhonk(w http.ResponseWriter, r *http.Request) {
return
}
u := login.GetUserInfo(r)
if u != nil && u.UserID != user.ID {
u = nil
}
if !h.Public {
if u == nil || u.UserID != h.UserID {
if u == nil {
http.NotFound(w, r)
return