Use time.Since
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2022-07-05 15:38:30 -07:00
parent 02044e10f3
commit eb5a60bbb6
1 changed files with 1 additions and 1 deletions

View File

@ -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