Skip to content

Commit

Permalink
fix: Fix edit an article update the activity updated date - EXO-75276 -
Browse files Browse the repository at this point in the history
Meeds-io/MIPs#161 (#307)

Fix edit an article update the activity updated date
  • Loading branch information
hakermi authored Nov 14, 2024
1 parent 7aeb0e9 commit 6c905b4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public News updateNews(News news,
}
if (!news.getPublicationState().isEmpty() && !DRAFT.equals(news.getPublicationState())) {
if (post != null) {
updateNewsActivity(news, post);
updateNewsActivity(news, post, originalNews.isActivityPosted());
}
NewsUtils.broadcastEvent(NewsUtils.UPDATE_NEWS, updater, news);
}
Expand Down Expand Up @@ -1659,10 +1659,10 @@ private void sendNotification(String currentUserId,
}
}

private void updateNewsActivity(News news, boolean post) {
private void updateNewsActivity(News news, boolean post, boolean isPosted) {
ExoSocialActivity activity = activityManager.getActivity(news.getActivityId());
if (activity != null) {
if (post) {
if (post && !isPosted) {
activity.setUpdated(System.currentTimeMillis());
}
activity.isHidden(!news.isActivityPosted());
Expand Down

0 comments on commit 6c905b4

Please sign in to comment.