lain is a fickle mistress

Ted Unangst 4 years ago
parent 5bfc213b82
commit efb2f0efcd

@ -1127,7 +1127,7 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
j["context"] = h.Convoy
}
case "react":
j["type"] = "EmojiReaction"
j["type"] = "EmojiReact"
j["object"] = h.XID
if h.Convoy != "" {
j["context"] = h.Convoy

@ -51,7 +51,7 @@ func userfromrow(row *sql.Row) (*WhatAbout, error) {
user.URL = fmt.Sprintf("https://%s/%s", serverName, user.Name)
}
if user.Options.Reaction == "" {
user.Options.Reaction = "😞"
user.Options.Reaction = "none"
}
return user, nil
}

@ -111,7 +111,7 @@ activities.
Does what it can.
.It Vt Like
Don't be ridiculous.
.It Vt EmojiReaction
.It Vt EmojiReact
Be ridiculous.
.El
.Ss METADATA

@ -4,6 +4,8 @@ changelog
--- Add Reactions.
+++ Rename reactions to badonkadonks.
+ Quick fix to hide all images.
+ Allow resending follow requests.

@ -126,7 +126,7 @@ Sometimes a thread goes on entirely too long.
Untag will hide further replies to the selected post, but without muting the
entire thread.
Replies higher in the tree are still received.
.It Ic react
.It Ic badonkadonk
Please no.
.It Ic edit
Change it up.

@ -16,6 +16,7 @@
<input tabindex=1 type="checkbox" id="maps" name="maps" value="apple" {{ if eq "apple" .User.Options.MapLink }}checked{{ end }}><span></span>
<p><label class="button" for="reaction">reaction:</label>
<select tabindex=1 name="reaction">
<option {{ and (eq .User.Options.Reaction "none") "selected" }}>none</option>
<option {{ and (eq .User.Options.Reaction "😞") "selected" }}>😞</option>
<option {{ and (eq .User.Options.Reaction "\U0001F937") "selected" }}>{{ "\U0001F937" }}</option>
<option {{ and (eq .User.Options.Reaction "🙈") "selected" }}>🙈</option>

@ -2,6 +2,7 @@
{{ $bonkcsrf := .BonkCSRF }}
{{ $IsPreview := .IsPreview }}
{{ $maplink := .MapLink }}
{{ $hasbadonk := .HasBadonk }}
{{ with .Honk }}
<header>
{{ if $bonkcsrf }}
@ -121,10 +122,12 @@ in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
<button onclick="return flogit(this, 'untag', '{{ .Honk.XID }}');">untag me</button>
{{ end }}
<button><a href="/edit?xid={{ .Honk.XID }}">edit</a></button>
{{ if $hasbadonk }}
{{ if .Honk.IsReacted }}
<button disabled>reacted</button>
<button disabled>badonkadonked</button>
{{ else }}
<button onclick="return flogit(this, 'react', '{{ .Honk.XID }}');">react</button>
<button onclick="return flogit(this, 'react', '{{ .Honk.XID }}');">badonkadonk</button>
{{ end }}
{{ end }}
</div>
</details>

@ -333,7 +333,7 @@ func inbox(w http.ResponseWriter, r *http.Request) {
}
what, _ := j.GetString("type")
obj, _ := j.GetString("object")
if what == "Like" || (what == "EmojiReaction" && originate(obj) != serverName) {
if what == "Like" || (what == "EmojiReact" && originate(obj) != serverName) {
return
}
who, _ := j.GetString("actor")
@ -1271,6 +1271,9 @@ func zonkit(w http.ResponseWriter, r *http.Request) {
}
if wherefore == "react" {
if user.Options.Reaction == "none" {
return
}
xonk := getxonk(userinfo.UserID, what)
if xonk != nil {
_, err := stmtUpdateFlags.Exec(flagIsReacted, xonk.ID)

Loading…
Cancel
Save