From cbd3487705ab2208549dbdf890d66b03620247d6 Mon Sep 17 00:00:00 2001 From: ilya Date: Fri, 22 Oct 2010 12:00:14 -0700 Subject: [PATCH] moved the nailer to the end so setup of mailer doesnt mess with the communitcation --- lib/diaspora/user/friending.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/diaspora/user/friending.rb b/lib/diaspora/user/friending.rb index 3e0f6b3c5..4a19ffd68 100644 --- a/lib/diaspora/user/friending.rb +++ b/lib/diaspora/user/friending.rb @@ -71,15 +71,15 @@ module Diaspora activate_friend(friend_request.person, aspect) Rails.logger.info("#{self.real_name}'s friend request has been accepted") - Notifier.request_accepted(self, friend_request.person, aspect).deliver friend_request.destroy + Notifier.request_accepted(self, friend_request.person, aspect).deliver #this is a new friend request else self.pending_requests << friend_request self.save - Notifier.new_request(self, friend_request.person).deliver Rails.logger.info("#{self.real_name} has received a friend request") friend_request.save + Notifier.new_request(self, friend_request.person).deliver end end