Compare commits
No commits in common. "2558b89b638b82548faf05b2baf764fb1ad29e51" and "86db06511768bc387376548d81f6e8e235b8fb6a" have entirely different histories.
2558b89b63
...
86db065117
@ -498,8 +498,6 @@ func EditPost(item models.Post) (models.Post, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func updatePostAttachmentVisibility(item models.Post) error {
|
func updatePostAttachmentVisibility(item models.Post) error {
|
||||||
log.Debug().Any("attachments", item.Body["attachments"]).Msg("Updating post attachments visibility...")
|
|
||||||
|
|
||||||
if item.Publisher.AccountID == nil {
|
if item.Publisher.AccountID == nil {
|
||||||
log.Warn().Msg("Post publisher did not have account id, skip updating attachments visibility...")
|
log.Warn().Msg("Post publisher did not have account id, skip updating attachments visibility...")
|
||||||
return nil
|
return nil
|
||||||
@ -520,12 +518,11 @@ func updatePostAttachmentVisibility(item models.Post) error {
|
|||||||
UserId: lo.ToPtr(uint64(*item.Publisher.AccountID)),
|
UserId: lo.ToPtr(uint64(*item.Publisher.AccountID)),
|
||||||
IsIndexable: item.Visibility == models.PostVisibilityAll,
|
IsIndexable: item.Visibility == models.PostVisibilityAll,
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Any("attachments", val).Err(err).Msg("An error occurred when updating post attachment visibility...")
|
log.Error().Any("attachments", val).Err(err).Msg("An error occurred when updating post attachment visibility...")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug().Any("attachments", val).Msg("Post attachment visibility updated.")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user