mirror of
https://git.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-22 03:51:28 +00:00
Support send akkoma custom reactions
This commit is contained in:
parent
ca99d0a789
commit
e6019323f6
|
@ -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 {
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
</form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<form action="/react-with/{{$st_id}}" method="post" target="_self" title="Custom akkoma reactions (ex. :blobemoji:)">
|
||||
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
||||
<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
|
||||
<input type="text" label="ex. :pleromaemoji:" id="akkoma-reaction" cols=30 name="akkoma-reaction">
|
||||
<input type="submit" value="Send custom reaction" class="pleroma-emoji">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue