|
|
@ -65,6 +65,20 @@ type RemoteUser struct { |
|
|
|
SharedInbox string |
|
|
|
SharedInbox string |
|
|
|
URL string |
|
|
|
URL string |
|
|
|
Handle string |
|
|
|
Handle string |
|
|
|
|
|
|
|
Created time.Time |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (ru *RemoteUser) CreatedFriendly() string { |
|
|
|
|
|
|
|
return ru.Created.Format("January 2, 2006") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (ru *RemoteUser) EstimatedHandle() string { |
|
|
|
|
|
|
|
if ru.Handle != "" { |
|
|
|
|
|
|
|
return ru.Handle |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
username := filepath.Base(ru.ActorID) |
|
|
|
|
|
|
|
host, _ := url.Parse(ru.ActorID) |
|
|
|
|
|
|
|
return username + "@" + host.Host |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (ru *RemoteUser) AsPerson() *activitystreams.Person { |
|
|
|
func (ru *RemoteUser) AsPerson() *activitystreams.Person { |
|
|
|