From 96a0d7cf05c84f8799d5946b3ded0e81623d7ddf Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Thu, 12 Oct 2023 16:07:27 +0300 Subject: [PATCH] fix merge conflicts --- mastodon/accounts.go | 12 ++---------- service/transport.go | 39 --------------------------------------- templates/status.tmpl | 5 ----- 3 files changed, 2 insertions(+), 54 deletions(-) diff --git a/mastodon/accounts.go b/mastodon/accounts.go index f5c635a..9057cb3 100644 --- a/mastodon/accounts.go +++ b/mastodon/accounts.go @@ -185,8 +185,8 @@ type Profile struct { Source *AccountSource // Set the base64 encoded character string of the image. - Avatar string - Header string + Avatar *multipart.FileHeader + Header *multipart.FileHeader //Other settings Bot *bool @@ -275,14 +275,6 @@ func (c *Client) AccountUpdate(ctx context.Context, profile *Profile) (*Account, if err != nil { 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()} var account Account diff --git a/service/transport.go b/service/transport.go index 2d12b9c..c5bdde7 100644 --- a/service/transport.go +++ b/service/transport.go @@ -207,43 +207,6 @@ func NewHandler(s *service, verbose bool, staticDir string) http.Handler { return s.SearchPage(c, sq, qType, offset) }, 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: ¬e, - 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 { return s.SettingsPage(c) }, 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("/emojis", emojisPage).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("/filters", filtersPage).Methods(http.MethodGet) r.HandleFunc("/profile", profilePage).Methods(http.MethodGet) diff --git a/templates/status.tmpl b/templates/status.tmpl index a705908..b509ca4 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -98,14 +98,9 @@ {{if (or .Content .SpoilerText)}}
-<<<<<<< HEAD {{if .Sensitive}}[NSFW]
{{end}} - {{if .SpoilerText}}[{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}]
{{end}} - {{StatusContentFilter .Content .Emojis .Mentions | Raw}} -======= {{- if .SpoilerText}}{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}
{{end -}} {{- StatusContentFilter .Content .Emojis .Mentions | Raw -}} ->>>>>>> upstream/master
{{end}} {{$st_id := .ID}}