From eb5a60bbb684a438d8e84c6a089462c28321ffc3 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 5 Jul 2022 15:38:30 -0700 Subject: [PATCH] Use time.Since --- functionality/filesharing/filesharing_functionality.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functionality/filesharing/filesharing_functionality.go b/functionality/filesharing/filesharing_functionality.go index a262c0b..be5e57b 100644 --- a/functionality/filesharing/filesharing_functionality.go +++ b/functionality/filesharing/filesharing_functionality.go @@ -112,7 +112,7 @@ func (f *Functionality) ReShareFiles(profile peer.CwtchPeer) error { // If fewer than 30 days have passed since we originally shared this file, // then attempt to share this file again... // TODO: In the future this would be the point to change the timestamp and reshare the file... - if time.Now().Sub(dateShared) < time.Hour*24*30 { + if time.Since(dateShared) < time.Hour*24*30 { manifest, manifestExists := profile.GetScopedZonedAttribute(attr.ConversationScope, attr.FilesharingZone, fmt.Sprintf("%s.manifest", filekey)) if manifestExists { // everything is in order, so reshare this file with the engine