Commit fbdb6a3a authored by zauberstuhl's avatar zauberstuhl

Change federation time layout

related to ganggo/federation#8
parent 069d290b
......@@ -249,9 +249,7 @@ func (c ApiComment) CreatePost() revel.Result {
c.Log.Error(TAG, "db", err, "api", ERR_SERVER)
return c.ApiError(http.StatusInternalServerError, ERR_SERVER)
}
entityComment.CreatedAt = federation.Time{
Time: comment.CreatedAt,
}
entityComment.CreatedAt.New(comment.CreatedAt)
dispatcher := jobs.Dispatcher{
User: c.CurrentUser,
......
......@@ -195,10 +195,10 @@ func (p ApiPost) Create() revel.Result {
Text: postText,
Author: p.CurrentUser.Person.Author,
Guid: guid,
CreatedAt: federation.Time{Time: time.Now()},
ProviderName: "GangGo",
Public: true,
}
entity.CreatedAt.New(time.Now())
// this one is a private message
if aspectID > 0 {
entity.Public = false
......@@ -458,10 +458,10 @@ func (p ApiPost) Reshare() revel.Result {
entity := federation.EntityReshare{
Author: p.CurrentUser.Person.Author,
Guid: guid,
CreatedAt: federation.Time{Time: time.Now()},
RootAuthor: rootPost.Person.Author,
RootGuid: rootPost.Guid,
}
entity.CreatedAt.New(time.Now())
var post models.Post
err = post.Create(&entity)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment