mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-09 13:28:44 +00:00
Feature: Bare bones Editing implimented
This commit is contained in:
parent
4df1f096be
commit
53353c0e64
5 changed files with 16 additions and 6 deletions
|
@ -986,7 +986,7 @@ func (s *service) Signout(c *client) (err error) {
|
|||
|
||||
func (s *service) Post(c *client, content string, replyToID string,
|
||||
format string, visibility string, isNSFW bool, spoilerText string,
|
||||
files []*multipart.FileHeader) (id string, err error) {
|
||||
files []*multipart.FileHeader, edit string) (id string, err error) {
|
||||
|
||||
var mediaIDs []string
|
||||
for _, f := range files {
|
||||
|
@ -1005,6 +1005,7 @@ func (s *service) Post(c *client, content string, replyToID string,
|
|||
ContentType: format,
|
||||
Visibility: visibility,
|
||||
Sensitive: isNSFW,
|
||||
Edit: edit,
|
||||
}
|
||||
st, err := c.PostStatus(c.ctx, tweet)
|
||||
if err != nil {
|
||||
|
|
|
@ -282,8 +282,9 @@ func NewHandler(s *service, logger *log.Logger, staticDir string) http.Handler {
|
|||
isNSFW := c.r.FormValue("is_nsfw") == "true"
|
||||
quickReply := c.r.FormValue("quickreply") == "true"
|
||||
files := c.r.MultipartForm.File["attachments"]
|
||||
edit := c.r.FormValue("edit-status-id")
|
||||
|
||||
id, err := s.Post(c, content, replyToID, format, visibility, isNSFW, spoilerText, files)
|
||||
id, err := s.Post(c, content, replyToID, format, visibility, isNSFW, spoilerText, files, edit)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue