all repos — honk @ d77c085920669b0e62d451ee0c2df2fcd586ace4

my fork of honk

update preferred username
Anirudh Oppiliappan x@icyphox.sh
Wed, 09 Nov 2022 12:03:57 +0530
commit

d77c085920669b0e62d451ee0c2df2fcd586ace4

parent

fb6f0d974099b2bd35ec2639621ebf8a5c24cfc7

4 files changed, 46 insertions(+), 34 deletions(-)

jump to
M activity.goactivity.go

@@ -1578,7 +1578,11 @@ j["id"] = user.URL

j["inbox"] = user.URL + "/inbox" j["outbox"] = user.URL + "/outbox" j["name"] = user.Display - j["preferredUsername"] = user.Name + if user.Options.DisplayName != "" { + j["preferredUsername"] = user.Options.DisplayName + } else { + j["preferredUsername"] = user.Name + } j["summary"] = user.HTAbout var tags []junk.Junk for _, o := range user.Onts {
M honk.gohonk.go

@@ -72,39 +72,40 @@ const serverUID int64 = -2

const readyLuserOne int64 = 1 type Honk struct { - ID int64 - UserID int64 - Username string - What string - Honker string - Handle string - Handles string - Oonker string - Oondle string - XID string - RID string - Date time.Time - DatePretty string - URL string - Noise string - Precis string - Format string - Convoy string - Audience []string - Public bool - Whofore int64 - Replies []*Honk - Flags int64 - HTPrecis template.HTML - HTML template.HTML - Style string - Open string - Donks []*Donk - Onts []string - Place *Place - Time *Time - Mentions []Mention - Badonks []Badonk + ID int64 + UserID int64 + Username string + DisplayName string + What string + Honker string + Handle string + Handles string + Oonker string + Oondle string + XID string + RID string + Date time.Time + DatePretty string + URL string + Noise string + Precis string + Format string + Convoy string + Audience []string + Public bool + Whofore int64 + Replies []*Honk + Flags int64 + HTPrecis template.HTML + HTML template.HTML + Style string + Open string + Donks []*Donk + Onts []string + Place *Place + Time *Time + Mentions []Mention + Badonks []Badonk } type Badonk struct {
M views/account.htmlviews/account.html

@@ -16,6 +16,8 @@ <p><label class="button" for="mentionall">mention all:</label>

<input tabindex=1 type="checkbox" id="mentionall" name="mentionall" value="mentionall" {{ if .User.Options.MentionAll }}checked{{ end }}><span></span> <p><label class="button" for="inlineqts">inline quotes:</label> <input tabindex=1 type="checkbox" id="inlineqts" name="inlineqts" value="inlineqts" {{ if .User.Options.InlineQuotes }}checked{{ end }}><span></span> +<p><label id="displayname">display name:</label> +<input tabindex=1 type="text" name="displayname"> <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>
M web.goweb.go

@@ -1237,6 +1237,11 @@ options.MapLink = "apple"

} else { options.MapLink = "" } + if r.FormValue("displayname") != "" { + options.DisplayName = r.FormValue("displayname") + } else { + options.DisplayName = "" + } options.Reaction = r.FormValue("reaction") sendupdate := false