Refactor issue subscription #4209

Closed
opened 2025-11-02 05:42:27 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @6543 on GitHub (Oct 29, 2019).

gitea version: until latest

current behaviour:

  • if you watch a repo you get notify on issue change ALWAYS
  • if you you not watch a repo you can get notify when subscribe to specific issue (DB table: issue_watch)

what i would expect:

  • if i watch a repo but unsubscribe on a issue I do NOT get notify
Originally created by @6543 on GitHub (Oct 29, 2019). gitea version: until latest current behaviour: * if you watch a repo you get notify on issue change ALWAYS * if you you not watch a repo you can get notify when subscribe to specific issue (DB table: issue_watch) what i would expect: * if i watch a repo but unsubscribe on a issue I do NOT get notify
GiteaMirror added the issue/stale label 2025-11-02 05:42:27 -06:00
Author
Owner

@guillep2k commented on GitHub (Oct 29, 2019):

Well, #7657 addresses this kind of problem but for repos by setting different types of subscription instead of on/off, auto, normal and don't (none being no record at all).

@guillep2k commented on GitHub (Oct 29, 2019): Well, #7657 addresses this kind of problem but for repos by setting different types of subscription instead of on/off, auto, normal and don't (none being no record at all).
Author
Owner

@stale[bot] commented on GitHub (Dec 28, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Dec 28, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@6543 commented on GitHub (Dec 28, 2019):

note for me: look at DB.tables: watch issue_watch

@6543 commented on GitHub (Dec 28, 2019): note for me: look at DB.tables: `watch` `issue_watch`
Author
Owner

@6543 commented on GitHub (Dec 28, 2019):

notify.action()
  make( map userNotifyed[] <- ignore user)

  get mentionedUsers
   -> if have read acces && !userNotifyed -> notify
   -> add to userNotifyed
 get issue subscriber
   -> if have read acces && !userNotifyed  -> notify
   -> add to userNotifyed

 get repo watcher
   -> if have read acces && !userNotifyed  -> notify
   -> add to userNotifyed

  if action == create {
    if !Doer.Subscribed_to_repo && !Doer.Subscribed_to_Issue && !IssueWatchModeDont && settings-allow-this {
       auto subscribe to issue
    }
  } 
@6543 commented on GitHub (Dec 28, 2019): ``` notify.action() make( map userNotifyed[] <- ignore user) get mentionedUsers -> if have read acces && !userNotifyed -> notify -> add to userNotifyed get issue subscriber -> if have read acces && !userNotifyed -> notify -> add to userNotifyed get repo watcher -> if have read acces && !userNotifyed -> notify -> add to userNotifyed if action == create { if !Doer.Subscribed_to_repo && !Doer.Subscribed_to_Issue && !IssueWatchModeDont && settings-allow-this { auto subscribe to issue } } ```
Author
Owner

@6543 commented on GitHub (Dec 28, 2019):

👀 models.notification.go L77

@6543 commented on GitHub (Dec 28, 2019): :eyes: models.notification.go L77
Author
Owner

@stale[bot] commented on GitHub (Feb 27, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 27, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@6543 commented on GitHub (Feb 27, 2020):

yep this issue can be closed ... pull's are on the way and have there own issues :)

@6543 commented on GitHub (Feb 27, 2020): yep this issue can be closed ... pull's are on the way and have there own issues :)
Author
Owner

@6543 commented on GitHub (Feb 27, 2020):

(#10478, #10475, [#10473 or #9535], #10401, ...)

@6543 commented on GitHub (Feb 27, 2020): (#10478, #10475, [#10473 or #9535], #10401, ...)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4209