Skip to content

Commit

Permalink
post-56f857b cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Jan 27, 2024
1 parent 56f857b commit 7ad07ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Users are authenticated using TLS client certificates; see [Gemini protocol spec
* /users/register creates a new user.
* /users/follows shows a list of followed users, ordered by activity.
* /users/resolve looks up federated user *user@domain* or local user *user*.
* /users/dm creates a post visible to a given user.
* /users/dm creates a post visible to mentioned users.
* /users/whisper creates a post visible to followers.
* /users/say creates a public post.
* /users/reply replies to a post.
Expand Down Expand Up @@ -185,11 +185,10 @@ User A is allowed to send a message to user B only if B follows A.

### Reply Visibility

| Post type | To | CC |
|--------------------|-------------|-----------------------------------------------------------------|
| To mentioned users | Post author | - |
| To followers | Post author | Post recipients and mentions |
| To public | Post author | Post recipients, mentions, followers of reply author and Public |
| Post type | To | CC |
|-----------------|-------------|--------------------------------------|
| To public | Post author | Followers of reply author and Public |
| Everything else | Post author | Post audience |

### Post Editing

Expand Down
6 changes: 1 addition & 5 deletions front/reply.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (h *Handler) reply(w text.Writer, r *request, args ...string) {
to.Add(note.AttributedTo)
cc.Add(r.User.Followers)
cc.Add(ap.Public)
} else if !note.IsPublic() {
} else {
to.Add(note.AttributedTo)
note.To.Range(func(id string, _ struct{}) bool {
cc.Add(id)
Expand All @@ -59,10 +59,6 @@ func (h *Handler) reply(w text.Writer, r *request, args ...string) {
cc.Add(id)
return true
})
} else {
r.Log.Error("Post audience is invalid", "post", note.ID)
w.Error()
return
}

h.post(w, r, nil, &note, to, cc, note.Audience, "Reply content")
Expand Down

0 comments on commit 7ad07ae

Please sign in to comment.