diff options
author | Maxwell Salzberg <maxwell@joindiaspora.com> | 2011-07-04 23:20:02 +0400 |
---|---|---|
committer | Maxwell Salzberg <maxwell@joindiaspora.com> | 2011-07-04 23:20:15 +0400 |
commit | f4f34e0faa39e20c5def836506ca308e29339e15 (patch) | |
tree | 13bda1117a30c2aa5c64acbdf2396212a1f154f4 /lib | |
parent | 2e10643d008a9e8f88aafd0c1d70eecbfac149e5 (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.rb | 8 |
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 |