lain is a fickle mistress
Ted Unangst tedu@tedunangst.com
Fri, 07 Feb 2020 11:57:00 -0500
8 files changed,
16 insertions(+),
7 deletions(-)
M
activity.go
→
activity.go
@@ -1127,7 +1127,7 @@ if h.Convoy != "" {
j["context"] = h.Convoy } case "react": - j["type"] = "EmojiReaction" + j["type"] = "EmojiReact" j["object"] = h.XID if h.Convoy != "" { j["context"] = h.Convoy
M
database.go
→
database.go
@@ -51,7 +51,7 @@ } else {
user.URL = fmt.Sprintf("https://%s/%s", serverName, user.Name) } if user.Options.Reaction == "" { - user.Options.Reaction = "😞" + user.Options.Reaction = "none" } return user, nil }
M
docs/activitypub.7
→
docs/activitypub.7
@@ -111,7 +111,7 @@ .It Vt Delete
Does what it can. .It Vt Like Don't be ridiculous. -.It Vt EmojiReaction +.It Vt EmojiReact Be ridiculous. .El .Ss METADATA
M
docs/changelog.txt
→
docs/changelog.txt
@@ -4,6 +4,8 @@ === next
--- Add Reactions. ++++ Rename reactions to badonkadonks. + + Quick fix to hide all images. + Allow resending follow requests.
M
docs/honk.1
→
docs/honk.1
@@ -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.
M
views/account.html
→
views/account.html
@@ -16,6 +16,7 @@ <p><label class="button" for="maps">apple map links:</label>
<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>
M
views/honk.html
→
views/honk.html
@@ -2,6 +2,7 @@ <article class="honk {{ .Honk.Style }}" data-convoy="{{ .Honk.Convoy }}">
{{ $bonkcsrf := .BonkCSRF }} {{ $IsPreview := .IsPreview }} {{ $maplink := .MapLink }} +{{ $hasbadonk := .HasBadonk }} {{ with .Honk }} <header> {{ if $bonkcsrf }}@@ -121,10 +122,12 @@ {{ else }}
<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>
M
web.go
→
web.go
@@ -333,7 +333,7 @@ return
} 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 @@ return
} if wherefore == "react" { + if user.Options.Reaction == "none" { + return + } xonk := getxonk(userinfo.UserID, what) if xonk != nil { _, err := stmtUpdateFlags.Exec(flagIsReacted, xonk.ID)