Update Profile Image Timestamp on Startup so Images get Reshared
This commit is contained in:
parent
d28d0db77c
commit
92ec4c6667
|
@ -174,6 +174,9 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
|||
} else {
|
||||
e.Data[constants2.Picture], _ = profile.GetScopedZonedAttribute(attr.LocalScope, attr.FilesharingZone, fmt.Sprintf("%s.path", key))
|
||||
serializedManifest, _ := profile.GetScopedZonedAttribute(attr.ConversationScope, attr.FilesharingZone, fmt.Sprintf("%s.manifest", key))
|
||||
// reset the share timestamp, currently file shares are hardcoded to expire after 30 days...
|
||||
// we reset the profile image here so that it is always available.
|
||||
profile.SetScopedZonedAttribute(attr.LocalScope, attr.FilesharingZone, fmt.Sprintf("%s.ts", key), strconv.FormatInt(time.Now().Unix(), 10))
|
||||
profile.ShareFile(key, serializedManifest)
|
||||
log.Debugf("Custom Profile Image: %v %s", e.Data[constants2.Picture], serializedManifest)
|
||||
}
|
||||
|
|
Reference in New Issue