Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
3e6a271ad8
3 changed files with 6 additions and 6 deletions
|
|
@ -15,7 +15,7 @@ class PublicsController < ApplicationController
|
||||||
caches_page :host_meta
|
caches_page :host_meta
|
||||||
|
|
||||||
def hcard
|
def hcard
|
||||||
@person = Person.find_by_id params[:id]
|
@person = Person.where(:guid => params[:guid])
|
||||||
unless @person.nil? || @person.owner.nil?
|
unless @person.nil? || @person.owner.nil?
|
||||||
render 'publics/hcard'
|
render 'publics/hcard'
|
||||||
else
|
else
|
||||||
|
|
@ -48,10 +48,10 @@ class PublicsController < ApplicationController
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
person = Person.find(params[:id])
|
person = Person.where(:guid => params[:guid]).first
|
||||||
|
|
||||||
if person.owner_id.nil?
|
if person.owner_id.nil?
|
||||||
Rails.logger.error("Received post for nonexistent person #{params[:id]}")
|
Rails.logger.error("Received post for nonexistent person #{params[:guid]}")
|
||||||
render :nothing => true, :status => 404
|
render :nothing => true, :status => 404
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ class Person < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def receive_url
|
def receive_url
|
||||||
"#{self.url}receive/users/#{self.id}/"
|
"#{self.url}receive/users/#{self.guid}/"
|
||||||
end
|
end
|
||||||
|
|
||||||
def public_url
|
def public_url
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,9 @@ Diaspora::Application.routes.draw do
|
||||||
|
|
||||||
#public routes
|
#public routes
|
||||||
match 'webfinger', :to => 'publics#webfinger'
|
match 'webfinger', :to => 'publics#webfinger'
|
||||||
match 'hcard/users/:id', :to => 'publics#hcard'
|
match 'hcard/users/:guid', :to => 'publics#hcard'
|
||||||
match '.well-known/host-meta',:to => 'publics#host_meta'
|
match '.well-known/host-meta',:to => 'publics#host_meta'
|
||||||
match 'receive/users/:id', :to => 'publics#receive'
|
match 'receive/users/:guid', :to => 'publics#receive'
|
||||||
match 'hub', :to => 'publics#hub'
|
match 'hub', :to => 'publics#hub'
|
||||||
|
|
||||||
#root
|
#root
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue