···23const LIKE_WINDOW = 100
4const FOLLOW_WINDOW = 100
05const SEEN_WINDOW = 100
67export type SeenPost = {
···22 * The last 100 DIDs the user has followed
23 */
24 follows: string[]
000025 /**
26 * The last 100 post URIs the user has seen from the Discover feed only
27 */
···31const userActionHistory: UserActionHistory = {
32 likes: [],
33 follows: [],
034 seen: [],
35}
36···58 .concat(dids)
59 .slice(-FOLLOW_WINDOW)
60}
000000061export function unfollow(dids: string[]) {
62 userActionHistory.follows = userActionHistory.follows.filter(
63 uri => !dids.includes(uri),
···23const LIKE_WINDOW = 100
4const FOLLOW_WINDOW = 100
5+const FOLLOW_SUGGESTION_WINDOW = 100
6const SEEN_WINDOW = 100
78export type SeenPost = {
···23 * The last 100 DIDs the user has followed
24 */
25 follows: string[]
26+ /*
27+ * The last 100 DIDs of suggested follows based on last follows
28+ */
29+ followSuggestions: string[]
30 /**
31 * The last 100 post URIs the user has seen from the Discover feed only
32 */
···36const userActionHistory: UserActionHistory = {
37 likes: [],
38 follows: [],
39+ followSuggestions: [],
40 seen: [],
41}
42···64 .concat(dids)
65 .slice(-FOLLOW_WINDOW)
66}
67+68+export function followSuggestion(dids: string[]) {
69+ userActionHistory.followSuggestions = userActionHistory.followSuggestions
70+ .concat(dids)
71+ .slice(-FOLLOW_SUGGESTION_WINDOW)
72+}
73+74export function unfollow(dids: string[]) {
75 userActionHistory.follows = userActionHistory.follows.filter(
76 uri => !dids.includes(uri),