Improve notification management #561

병합
Plume_migration_agent notifications 에서 master 로 4 commits 를 머지했습니다 5 년 전
trinity-1686a 코멘트됨, 5 년 전
소유자

fix #472
fix #505

fix #472 fix #505
elegaanz (Migrated from github.com) 검토됨 5 년 전
elegaanz (Migrated from github.com) 코멘트됨, 5 년 전

Shouln't this be .any(...)? Because I'm still getting duplicated notifications.

Shouln't this be `.any(...)`? Because I'm still getting duplicated notifications.
elegaanz (Migrated from github.com) 검토됨 5 년 전
elegaanz (Migrated from github.com) 코멘트됨, 5 년 전

Also, AsActor::is_local is technically broken, since it only does instance_id == 1 which is not always correct (even if it is most of the time (like, unless you ran plm instance new twice, it will probably be correct)).

Maybe we should have a global storing the local instance info somewhere BTW (loaded only once when the app starts)? It would probably avoid a lot of queries to the database, and would allow to fix this issue without changing AsActor definition (but probably in another PR if we ever do it).

Also, `AsActor::is_local` is technically broken, since it only does `instance_id == 1` which is not always correct (even if it is most of the time (like, unless you ran `plm instance new` twice, it will probably be correct)). Maybe we should have a global storing the local instance info somewhere BTW (loaded only once when the app starts)? It would probably avoid a lot of queries to the database, and would allow to fix this issue without changing `AsActor` definition (but probably in another PR if we ever do it).
trinity-1686a 검토됨 5 년 전
trinity-1686a 코멘트됨, 5 년 전
포스터
소유자

if all mentioned users are different from this author, send notification. I think it's correct, and when I tested it, it seemed to work.
Edit : My bad, forgot to add some file

if *all* mentioned users are different from this author, send notification. I think it's correct, and when I tested it, it seemed to work. Edit : My bad, forgot to add some file
codecov[bot] 코멘트됨, 5 년 전 (Migrated from github.com)

Codecov Report

Merging #561 into master will decrease coverage by <.01%.
The diff coverage is 54.34%.

@@            Coverage Diff             @@
##           master     #561      +/-   ##
==========================================
- Coverage   35.05%   35.05%   -0.01%     
==========================================
  Files          67       67              
  Lines        7834     7843       +9     
  Branches     1877     1885       +8     
==========================================
+ Hits         2746     2749       +3     
- Misses       4331     4332       +1     
- Partials      757      762       +5
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/561?src=pr&el=h1) Report > Merging [#561](https://codecov.io/gh/Plume-org/Plume/pull/561?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/918bda14ececc7f72b5741896c2c7ca8fba114f9?src=pr&el=desc) will **decrease** coverage by `<.01%`. > The diff coverage is `54.34%`. ```diff @@ Coverage Diff @@ ## master #561 +/- ## ========================================== - Coverage 35.05% 35.05% -0.01% ========================================== Files 67 67 Lines 7834 7843 +9 Branches 1877 1885 +8 ========================================== + Hits 2746 2749 +3 - Misses 4331 4332 +1 - Partials 757 762 +5 ```
elegaanz (Migrated from github.com) 검토됨 5 년 전
elegaanz (Migrated from github.com) 코멘트됨, 5 년 전

Oh, I found what is wrong I think: the mention was inserted after the comment in the database.

Oh, I found what is wrong I think: the mention was inserted after the comment in the database.
elegaanz (Migrated from github.com) 검토됨 5 년 전
elegaanz (Migrated from github.com) 코멘트됨, 5 년 전

OK, I'm too late, you already found it.

OK, I'm too late, you already found it.
elegaanz (Migrated from github.com) 이 변경사항을 승인하였습니다. 5 년 전
elegaanz (Migrated from github.com) left a comment

Seems to work! Thank you! 😊

Seems to work! Thank you! :blush:

리뷰어

The pull request has been merged as c9070930d2.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b notifications master
git pull origin notifications

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff notifications
git push origin master
로그인하여 이 대화에 참여
No reviewers
마일스톤 없음
담당자 없음
참여자 2명
알림
마감일
기한이 올바르지 않거나 범위를 벗어났습니다. 'yyyy-mm-dd'형식을 사용해주십시오.

마감일이 설정되지 않았습니다.

의존성

No dependencies set.

Reference: Plume/Plume#561
불러오는 중...
아직 콘텐츠가 없습니다.