Method: ActivityNotification::NotificationApi#latest_group_member

Defined in:
lib/activity_notification/apis/notification_api.rb

#latest_group_memberNotificaion

Returns the latest group member notification instance of this notification. If this group owner has no group members, group owner instance self will be returned.

Returns:

  • (Notificaion)

    Notification instance of the latest group member notification



665
666
667
668
# File 'lib/activity_notification/apis/notification_api.rb', line 665

def latest_group_member
  notification = group_member? && group_owner.present? ? group_owner : self
  notification.group_member_exists? ? notification.group_members.latest : self
end