diff options
author | 2025-02-12 09:49:33 -0800 | |
---|---|---|
committer | 2025-02-12 09:49:33 -0800 | |
commit | fccb0bc102f2a54a21eed343cda64f9a5221b677 (patch) | |
tree | b7c1858f4a92841dfaf59e7102189a635d7136f8 /internal/api/model | |
parent | [performance] improved enum migrations (#3782) (diff) | |
download | gotosocial-fccb0bc102f2a54a21eed343cda64f9a5221b677.tar.xz |
[feature] Implement backfilling statuses thru scheduled_at (#3685)
* Implement backfilling statuses thru scheduled_at
* Forbid mentioning others in backfills
* Update error messages & codes
* Add new tests for backfilled statuses
* Test that backfilling doesn't timeline or notify
* Fix check for absence of notification
* Test that backfills do not cause federation
* Fix type of apimodel.StatusCreateRequest.ScheduledAt in tests
* Add config file switch and min date check
Diffstat (limited to 'internal/api/model')
-rw-r--r-- | internal/api/model/status.go | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/internal/api/model/status.go b/internal/api/model/status.go index ea9fbaa35..2ee3123e6 100644 --- a/internal/api/model/status.go +++ b/internal/api/model/status.go @@ -17,7 +17,11 @@ package model -import "github.com/superseriousbusiness/gotosocial/internal/language" +import ( + "time" + + "github.com/superseriousbusiness/gotosocial/internal/language" +) // Status models a status or post. // @@ -231,9 +235,14 @@ type StatusCreateRequest struct { Federated *bool `form:"federated" json:"federated"` // ISO 8601 Datetime at which to schedule a status. - // Providing this parameter will cause ScheduledStatus to be returned instead of Status. + // + // Providing this parameter with a *future* time will cause ScheduledStatus to be returned instead of Status. // Must be at least 5 minutes in the future. - ScheduledAt string `form:"scheduled_at" json:"scheduled_at"` + // This feature isn't implemented yet. + // + // Providing this parameter with a *past* time will cause the status to be backdated, + // and will not push it to the user's followers. This is intended for importing old statuses. + ScheduledAt *time.Time `form:"scheduled_at" json:"scheduled_at"` // ISO 639 language code for this status. Language string `form:"language" json:"language"` |