Use time.Since
This commit is contained in:
parent
02044e10f3
commit
eb5a60bbb6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue