diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-11-13 04:20:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 03:20:34 +0000 |
commit | 3081e7e1536356346f73fb4a0d00101863b2cf05 (patch) | |
tree | 7fdf3a5e6a56c585cec8d23f24b0ed56d24f889c /models | |
parent | 024fe11cd31361740095a2f29b400e1a152454a7 (diff) | |
download | gitea-3081e7e1536356346f73fb4a0d00101863b2cf05.tar.gz gitea-3081e7e1536356346f73fb4a0d00101863b2cf05.zip |
Fix missing mail reply address (#27997)
Fixes https://codeberg.org/forgejo/forgejo/issues/1458
Some mails such as issue creation mails are missing the reply-to-comment
address. This PR fixes that and specifies which comment types should get
a reply-possibility.
Diffstat (limited to 'models')
-rw-r--r-- | models/issues/comment.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/issues/comment.go b/models/issues/comment.go index 8e06838f73..f2a3cb7b02 100644 --- a/models/issues/comment.go +++ b/models/issues/comment.go @@ -183,6 +183,14 @@ func (t CommentType) HasAttachmentSupport() bool { return false } +func (t CommentType) HasMailReplySupport() bool { + switch t { + case CommentTypeComment, CommentTypeCode, CommentTypeReview, CommentTypeDismissReview, CommentTypeReopen, CommentTypeClose, CommentTypeMergePull, CommentTypeAssignees: + return true + } + return false +} + // RoleInRepo presents the user's participation in the repo type RoleInRepo string |