mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 21:32:27 -05:00
renaming
This commit is contained in:
parent
0b0f3d9e9a
commit
74bc0feee7
3 changed files with 41 additions and 20 deletions
|
|
@ -25,6 +25,7 @@ import (
|
|||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/config"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db/model"
|
||||
|
|
@ -73,9 +74,20 @@ func (m *statusModule) statusCreatePOSTHandler(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
// newStatus := &model.Status{
|
||||
uris := util.GenerateURIs(authed.Account.Username, m.config.Protocol, m.config.Host)
|
||||
newStatusID := uuid.NewString()
|
||||
|
||||
// }
|
||||
newStatus := &model.Status{
|
||||
ID: newStatusID,
|
||||
URI: fmt.Sprintf("%s/%s", uris.StatusesURI, newStatusID),
|
||||
URL: fmt.Sprintf("%s/%s", uris.StatusesURL, newStatusID),
|
||||
Content: util.HTMLFormat(form.Status),
|
||||
Local: true, // will always be true if this status is being created through the client API
|
||||
AccountID: authed.Account.ID,
|
||||
InReplyToID: form.InReplyToID,
|
||||
ContentWarning: form.SpoilerText,
|
||||
ActivityStreamsType: "Note",
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue