Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaxwell Salzberg <maxwell@joindiaspora.com>2011-07-04 23:20:02 +0400
committerMaxwell Salzberg <maxwell@joindiaspora.com>2011-07-04 23:20:15 +0400
commitf4f34e0faa39e20c5def836506ca308e29339e15 (patch)
tree13bda1117a30c2aa5c64acbdf2396212a1f154f4 /lib
parent2e10643d008a9e8f88aafd0c1d70eecbfac149e5 (diff)
fix for public posts in development mode, in single process mode, when your pod_url is still set to localhost
Diffstat (limited to 'lib')
-rw-r--r--lib/pubsubhubbub.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/pubsubhubbub.rb b/lib/pubsubhubbub.rb
index b24b7f798..6de442a8e 100644
--- a/lib/pubsubhubbub.rb
+++ b/lib/pubsubhubbub.rb
@@ -12,7 +12,11 @@ class Pubsubhubbub
end
def publish(feed)
- response = RestClient.post(@hub, :headers => @headers, 'hub.url' => feed, 'hub.mode' => 'publish')
- response
+ begin
+ response = RestClient.post(@hub, :headers => @headers, 'hub.url' => feed, 'hub.mode' => 'publish')
+ return response
+ rescue RestClient::BadRequest=> e
+ Rails.logger.warn "Public URL for your users are incorrect. this is ok if you are in development and localhost is your pod_url#{e.inspect}"
+ end
end
end