fix merge conflicts

This commit is contained in:
localhost_frssoft 2023-10-12 16:07:27 +03:00
parent 4379eab5bf
commit 96a0d7cf05
3 changed files with 2 additions and 54 deletions

View file

@ -185,8 +185,8 @@ type Profile struct {
Source *AccountSource Source *AccountSource
// Set the base64 encoded character string of the image. // Set the base64 encoded character string of the image.
Avatar string Avatar *multipart.FileHeader
Header string Header *multipart.FileHeader
//Other settings //Other settings
Bot *bool Bot *bool
@ -275,14 +275,6 @@ func (c *Client) AccountUpdate(ctx context.Context, profile *Profile) (*Account,
if err != nil { if err != nil {
return nil, err return nil, err
} }
if profile.Bot != nil {
params.Set("bot", strconv.FormatBool(*profile.Bot))
}
if profile.Pleroma != nil {
if profile.Pleroma.AcceptsChatMessages != nil {
params.Set("accepts_chat_messages", strconv.FormatBool(*profile.Pleroma.AcceptsChatMessages))
}
}
params := &multipartRequest{Data: &buf, ContentType: mw.FormDataContentType()} params := &multipartRequest{Data: &buf, ContentType: mw.FormDataContentType()}
var account Account var account Account

View file

@ -207,43 +207,6 @@ func NewHandler(s *service, verbose bool, staticDir string) http.Handler {
return s.SearchPage(c, sq, qType, offset) return s.SearchPage(c, sq, qType, offset)
}, SESSION, HTML) }, SESSION, HTML)
userEditPage := handle(func(c *client) error {
return s.UserEditPage(c)
}, SESSION, HTML)
userEdit := handle(func(c *client) error {
displayName := c.r.FormValue("display-name")
note := c.r.FormValue("note")
locked := c.r.FormValue("locked") == "true"
bot := c.r.FormValue("bot") == "true"
acceptsChatMessages := c.r.FormValue("accepts-chat-messages") == "true"
hideFavourites := c.r.FormValue("hide-favourites") == "true"
pleromaProfile := mastodon.ProfilePleroma{
AcceptsChatMessages: &acceptsChatMessages,
HideFavourites: &hideFavourites,
}
usersettings := mastodon.Profile{
DisplayName: &displayName,
Note: &note,
Locked: &locked,
Fields: nil,
Source: nil,
Avatar: "",
Header: "",
Bot: &bot,
Pleroma: &pleromaProfile,
}
err := s.UserSave(c, usersettings)
if err != nil {
return err
}
c.redirect("/user/"+c.r.FormValue("id"))
return nil
}, SESSION, HTML)
settingsPage := handle(func(c *client) error { settingsPage := handle(func(c *client) error {
return s.SettingsPage(c) return s.SettingsPage(c)
}, SESSION, HTML) }, SESSION, HTML)
@ -870,8 +833,6 @@ func NewHandler(s *service, verbose bool, staticDir string) http.Handler {
r.HandleFunc("/aboutinstance", aboutInstance).Methods(http.MethodGet) r.HandleFunc("/aboutinstance", aboutInstance).Methods(http.MethodGet)
r.HandleFunc("/emojis", emojisPage).Methods(http.MethodGet) r.HandleFunc("/emojis", emojisPage).Methods(http.MethodGet)
r.HandleFunc("/search", searchPage).Methods(http.MethodGet) r.HandleFunc("/search", searchPage).Methods(http.MethodGet)
r.HandleFunc("/useredit", userEditPage).Methods(http.MethodGet)
r.HandleFunc("/useredit", userEdit).Methods(http.MethodPost)
r.HandleFunc("/settings", settingsPage).Methods(http.MethodGet) r.HandleFunc("/settings", settingsPage).Methods(http.MethodGet)
r.HandleFunc("/filters", filtersPage).Methods(http.MethodGet) r.HandleFunc("/filters", filtersPage).Methods(http.MethodGet)
r.HandleFunc("/profile", profilePage).Methods(http.MethodGet) r.HandleFunc("/profile", profilePage).Methods(http.MethodGet)

View file

@ -98,14 +98,9 @@
</div> </div>
{{if (or .Content .SpoilerText)}} {{if (or .Content .SpoilerText)}}
<div class="status-content"> <div class="status-content">
<<<<<<< HEAD
{{if .Sensitive}}[NSFW]<br/>{{end}} {{if .Sensitive}}[NSFW]<br/>{{end}}
{{if .SpoilerText}}[{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}]<br/>{{end}}
{{StatusContentFilter .Content .Emojis .Mentions | Raw}}
=======
{{- if .SpoilerText}}{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}<br/>{{end -}} {{- if .SpoilerText}}{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}<br/>{{end -}}
{{- StatusContentFilter .Content .Emojis .Mentions | Raw -}} {{- StatusContentFilter .Content .Emojis .Mentions | Raw -}}
>>>>>>> upstream/master
</div> </div>
{{end}} {{end}}
{{$st_id := .ID}} {{$st_id := .ID}}