mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-12-22 11:23:33 +02:00
Support send akkoma custom reactions
This commit is contained in:
parent
ca99d0a789
commit
e6019323f6
2 changed files with 10 additions and 0 deletions
|
@ -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