From 727b5701327a7e1c5f826f496b8e99c2004e471a Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Wed, 18 Aug 2021 17:34:12 -0300 Subject: experimental type change for times: string to time.Time idk what i was doing before this but i wanted to use time.Time to get something similar to how 4chan's timestamps work, it would've also been easier for scripts to interface with it, since we have data we can work with much easier than a string i am not sure what this means for federation yet, so i'll test it out before i do anything. --- cacheDatabase.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cacheDatabase.go') diff --git a/cacheDatabase.go b/cacheDatabase.go index ffe5dad..d735cfe 100644 --- a/cacheDatabase.go +++ b/cacheDatabase.go @@ -92,7 +92,7 @@ func WriteActivitytoCache(db *sql.DB, obj ObjectBase) { return } - if obj.Updated == "" { + if obj.Updated.IsZero() { obj.Updated = obj.Published } @@ -127,7 +127,7 @@ func WriteActivitytoCacheWithAttachment(db *sql.DB, obj ObjectBase, attachment O return } - if obj.Updated == "" { + if obj.Updated.IsZero() { obj.Updated = obj.Published } @@ -158,7 +158,7 @@ func WriteAttachmentToCache(db *sql.DB, obj ObjectBase) { return } - if obj.Updated == "" { + if obj.Updated.IsZero() { obj.Updated = obj.Published } @@ -189,7 +189,7 @@ func WritePreviewToCache(db *sql.DB, obj NestedObjectBase) { return } - if obj.Updated == "" { + if obj.Updated.IsZero() { obj.Updated = obj.Published } -- cgit v1.2.3