Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Notification: Fix message-id duplication for pushing commits
Browse files Browse the repository at this point in the history
If a notification is caused by an event about "creating something", we
give id of the resource as message-id of the notification email so that
Yobi can create comments on the resource, which is determined by the
message-id in In-Reply-To header, from the replies.

But if Yobi sends multiple "creating" notifications on a same resource,
it will send multiple emails with same message-id and it may cause
problems in MUA, e.g. trash them.

Notification for pushing commits is that. It was considered as "creating"
event but the resource is "project" even if the event does not create
a project. Naturally, pushing commits to a same project is very common
event so it has been caused the problem very frequently.

Solution: Do not consider "NEW_COMMIT" as "creating" event.
  • Loading branch information
Yi EungJun committed Feb 10, 2015
1 parent 1e9e200 commit 461f44d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/enumeration/EventType.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public boolean isCreating() {
case NEW_PULL_REQUEST:
case NEW_COMMENT:
case NEW_REVIEW_COMMENT:
case NEW_COMMIT:
// We consider "NEW_COMMIT" as "UPDATE" because it updates a project.
return true;
default:
return false;
Expand Down

0 comments on commit 461f44d

Please sign in to comment.