implemented federation
This commit is contained in:
@@ -2,6 +2,28 @@ package models
|
||||
|
||||
import "time"
|
||||
|
||||
// FederationActivity stores all inbound and outbound ActivityPub activities.
|
||||
type FederationActivity struct {
|
||||
ID int64 `xorm:"'id' pk autoincr" json:"id"`
|
||||
ActorAPID string `xorm:"'actor_ap_id' notnull index varchar(500)" json:"actorApId"`
|
||||
Type string `xorm:"'type' notnull varchar(50)" json:"type"`
|
||||
ObjectJSON string `xorm:"'object_json' text" json:"objectJson"`
|
||||
Direction string `xorm:"'direction' notnull varchar(10)" json:"direction"` // inbound|outbound
|
||||
RemoteActor string `xorm:"'remote_actor' varchar(500)" json:"remoteActor"`
|
||||
Published time.Time `xorm:"'published' index" json:"published"`
|
||||
CreatedAt time.Time `xorm:"'created_at' created" json:"createdAt"`
|
||||
}
|
||||
|
||||
// RemoteActor caches public actor documents fetched from remote instances.
|
||||
type RemoteActor struct {
|
||||
ID int64 `xorm:"'id' pk autoincr"`
|
||||
APID string `xorm:"'ap_id' notnull unique varchar(500)"`
|
||||
InboxURL string `xorm:"'inbox_url' varchar(500)"`
|
||||
PublicKey string `xorm:"'public_key' text"`
|
||||
FetchedAt time.Time `xorm:"'fetched_at'"`
|
||||
CreatedAt time.Time `xorm:"'created_at' created"`
|
||||
}
|
||||
|
||||
type FederationActor struct {
|
||||
ID int64 `xorm:"'id' pk autoincr" json:"id"`
|
||||
UserID int64 `xorm:"'user_id' notnull unique index" json:"userId"`
|
||||
|
||||
Reference in New Issue
Block a user