Skip to content

Multiple channels marking as sent multiple times #30

Description

@antonivanopoulos
self.channels.each do |channel_name, options|
  if(options[:aggregate_per] == false)
    self.mark_as_sent!
    self.class.delay.deliver_notification_channel(self.id, channel_name)
else
…

This is part of the current implementation of the #deliver method on the base notification class (https://github.com/Papercloud/notify_user/blob/master/app/models/notify_user/base_notification.rb#L294). The issue here is that the AASM is throwing an invalid transition error because when one channel marks the notification as sent, subsequent channels will also try to mark it as sent.

Also has the added issue that aggregated notifications call mark_as_pending_as_aggregation_parent!; so you can't currently have one channel that aggregates, and one that doesn't. But this is perhaps a separate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions