DG IZ push to wrapped to check before sending off a friend req
This commit is contained in:
parent
e7ac8bec32
commit
1a44cf5ab3
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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>"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue