update preferred username
Anirudh Oppiliappan x@icyphox.sh
Wed, 09 Nov 2022 12:03:57 +0530
4 files changed,
46 insertions(+),
34 deletions(-)
M
activity.go
→
activity.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.go
→
honk.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.html
→
views/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>