Support send akkoma custom reactions

This commit is contained in:
localhost_frssoft 2022-10-26 01:16:13 +03:00
parent ca99d0a789
commit e6019323f6
2 changed files with 10 additions and 0 deletions

View file

@ -333,6 +333,10 @@ func NewHandler(s *service, logger *log.Logger, staticDir string) http.Handler {
putreact := handle(func(c *client) error {
q := c.r.URL.Query()
emoji := q.Get("emoji")
if len(emoji) <= 0 {
emoji = c.r.FormValue("akkoma-reaction")
}
id, _ := mux.Vars(c.r)["id"]
_, err := s.PutReact(c, id, emoji)
if err != nil {