A social RSS reader built on the AT Protocol. glean.at
glean atproto atmosphere rss feed social app
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

Temorarily disable user action in cluster (recommendation system)

+6
+4
internal/cluster/dismiss.go
··· 11 11 } 12 12 13 13 func (e *Engine) DismissFeed(ctx context.Context, userDID, feedURL, reason string) error { 14 + return nil 14 15 _, err := e.db.ExecContext(ctx, ` 15 16 INSERT INTO recs.dismissed_recommendations (user_did, target_type, target_id, reason) 16 17 VALUES (?, 'feed', ?, ?) ··· 20 21 } 21 22 22 23 func (e *Engine) DismissArticle(ctx context.Context, userDID, articleURL, reason string) error { 24 + return nil 23 25 _, err := e.db.ExecContext(ctx, ` 24 26 INSERT INTO recs.dismissed_recommendations (user_did, target_type, target_id, reason) 25 27 VALUES (?, 'article', ?, ?) ··· 29 31 } 30 32 31 33 func (e *Engine) RecordImpressions(ctx context.Context, userDID string, impressions []Impression) error { 34 + return nil 32 35 tx, err := e.db.BeginTx(ctx, nil) 33 36 if err != nil { 34 37 return err ··· 51 54 } 52 55 53 56 func (e *Engine) MarkImpressionActed(ctx context.Context, userDID, targetType, targetID string) error { 57 + return nil 54 58 _, err := e.db.ExecContext(ctx, ` 55 59 UPDATE recs.recommendation_impressions SET acted = 1 56 60 WHERE user_did = ? AND target_type = ? AND target_id = ?
+2
internal/cluster/weights.go
··· 12 12 ) 13 13 14 14 func (e *Engine) RewardSignal(ctx context.Context, userDID string, signal string) { 15 + return 15 16 e.adjustWeight(ctx, userDID, signal, 1.0) 16 17 } 17 18 18 19 func (e *Engine) PenalizeSignal(ctx context.Context, userDID string, signal string) { 20 + return 19 21 e.adjustWeight(ctx, userDID, signal, -1.0) 20 22 } 21 23