mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-06 02:53:16 -06:00
add support for status edits in the database, and update status dereferencer to handle them
This commit is contained in:
parent
fc8d3742c9
commit
3e131f5da6
21 changed files with 623 additions and 172 deletions
|
|
@ -45,13 +45,14 @@ func NewULID() string {
|
|||
return ulid.String()
|
||||
}
|
||||
|
||||
// NewULIDFromTime returns a new ULID string using the given time, or an error if something goes wrong.
|
||||
func NewULIDFromTime(t time.Time) (string, error) {
|
||||
// NewULIDFromTime returns a new ULID string using
|
||||
// given time, or from current time on any error.
|
||||
func NewULIDFromTime(t time.Time) string {
|
||||
newUlid, err := ulid.New(ulid.Timestamp(t), rand.Reader)
|
||||
if err != nil {
|
||||
return "", err
|
||||
return NewULID()
|
||||
}
|
||||
return newUlid.String(), nil
|
||||
return newUlid.String()
|
||||
}
|
||||
|
||||
// NewRandomULID returns a new ULID string using a random time in an ~80 year range around the current datetime, or an error if something goes wrong.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue