forked from alemi/upub
alemi
7f996aa2c1
basically relays send us a lot of announce activities to share posts but we don't care about those activities: it's db bloat and it increases the shares count. keep a table keeping track of followed relays and lazily skip activities by them, just fetch. IMPORTANT relays are only loaded at startup, so if you subscribe to a new relay restart your server once it accepts!!!
16 lines
421 B
Rust
16 lines
421 B
Rust
use sea_orm::entity::prelude::*;
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
|
#[sea_orm(table_name = "relays")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: String,
|
|
pub accepted: bool,
|
|
pub forwarding: bool,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
// TODO how to represent this User-to-User relation in sea orm??
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|