mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-09 13:28:44 +00:00
Partially selectable reblogs visibility (fluoride required fix)
This commit is contained in:
parent
a678b620a1
commit
8c41878b6d
5 changed files with 36 additions and 8 deletions
|
@ -1052,8 +1052,8 @@ func (s *service) UnReact(c *client, id string, emoji string) (count int64, err
|
|||
return
|
||||
}
|
||||
|
||||
func (s *service) Retweet(c *client, id string) (count int64, err error) {
|
||||
st, err := c.Reblog(c.ctx, id)
|
||||
func (s *service) Retweet(c *client, id string, visibility string) (count int64, err error) {
|
||||
st, err := c.Reblog(c.ctx, id, visibility)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -381,7 +381,8 @@ func NewHandler(s *service, logger *log.Logger, staticDir string) http.Handler {
|
|||
retweet := handle(func(c *client) error {
|
||||
id, _ := mux.Vars(c.r)["id"]
|
||||
rid := c.r.FormValue("retweeted_by_id")
|
||||
_, err := s.Retweet(c, id)
|
||||
visibility := c.r.FormValue("retweet_visibility")
|
||||
_, err := s.Retweet(c, id, visibility)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -773,7 +774,8 @@ func NewHandler(s *service, logger *log.Logger, staticDir string) http.Handler {
|
|||
|
||||
fRetweet := handle(func(c *client) error {
|
||||
id, _ := mux.Vars(c.r)["id"]
|
||||
count, err := s.Retweet(c, id)
|
||||
visibility := c.r.FormValue("retweet_visibility")
|
||||
count, err := s.Retweet(c, id, visibility)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue