DG IZ push to wrapped to check before sending off a friend req

This commit is contained in:
ilya 2010-07-06 15:11:24 -04:00
parent e7ac8bec32
commit 1a44cf5ab3
2 changed files with 6 additions and 1 deletions

View file

@ -26,7 +26,7 @@ class FriendRequest
end end
def send_off def send_off
push_to [self.recipient] push_to_recipient self.recipient
end end
end end

View file

@ -66,6 +66,11 @@ module Diaspora
end end
end end
def push_to_recipient(recipient)
if self.sender_id == User.first.id
push_to( [recipient] )
end
end
def prep_webhook def prep_webhook
"<post>#{self.to_xml.to_s}</post>" "<post>#{self.to_xml.to_s}</post>"