mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Fix login on Mastodon iOS app for users with no statuses (#1042)
* Fix login on Mastodon iOS app for users with no statuses Mastodon for iOS can't cope with an empty string for a date and expect a JSON `null` instead. Fixes https://github.com/superseriousbusiness/gotosocial/issues/1010 * Fix expected values in tests to match
This commit is contained in:
@ -105,10 +105,11 @@ func (c *converter) AccountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A
|
||||
}
|
||||
|
||||
// check when the last status was
|
||||
var lastStatusAt string
|
||||
var lastStatusAt *string
|
||||
lastPosted, err := c.db.GetAccountLastPosted(ctx, a.ID, false)
|
||||
if err == nil && !lastPosted.IsZero() {
|
||||
lastStatusAt = util.FormatISO8601(lastPosted)
|
||||
lastStatusAtTemp := util.FormatISO8601(lastPosted)
|
||||
lastStatusAt = &lastStatusAtTemp
|
||||
}
|
||||
|
||||
// set account avatar fields if available
|
||||
|
Reference in New Issue
Block a user