like own study to notify timeline - closes #9123

pull/9131/head
Thibault Duplessis 2021-06-07 07:56:30 +02:00
parent ca916ad266
commit 374cf76577
1 changed files with 2 additions and 3 deletions

View File

@ -805,9 +805,8 @@ final class StudyApi(
studyRepo.like(studyId, who.u, v) map { likes =>
sendTo(studyId)(_.setLiking(Study.Liking(likes, v), who))
if (v) studyRepo byId studyId foreach {
_ foreach { study =>
if (who.u != study.ownerId && study.isPublic)
timeline ! (Propagate(StudyLike(who.u, study.id.value, study.name.value)) toFollowersOf who.u)
_.filter(_.isPublic) foreach { study =>
timeline ! (Propagate(StudyLike(who.u, study.id.value, study.name.value)) toFollowersOf who.u)
}
}
}