Appview mutes (#1184)
* hook up indexing * graph service + getList routes * migration * mute lists * add getListMutes * mute list tests * add mutes table & mute/unmuteActor routes * add getMutes * implement mute functionality * remove unspecced * mute tests * mute impl tests * remove proxy tests * add mute state to snapshots * bail out of mute subquery when no viewer * Fix minor race in bsky mutelist tests * Update pds proxy snaps based on appview mutes * ensure process after unmute * update snap * move adminAuth to seedclient param --------- Co-authored-by: Devin Ivy <devinivy@gmail.com>
This commit is contained in:
parent
283fb1d8d6
commit
4f2f3d8d17
packages
bsky
src
tests
__snapshots__
seeds
views
__snapshots__
actor-search.test.ts.snapauthor-feed.test.ts.snapfollows.test.ts.snaplikes.test.ts.snapmute-lists.test.ts.snapmutes.test.ts.snapnotifications.test.ts.snapposts.test.ts.snapprofile.test.ts.snapreposts.test.ts.snapthread.test.ts.snaptimeline.test.ts.snap
mute-lists.test.tsmutes.test.tspopular.test.tspds/tests/proxied
__snapshots__
actor-search.test.ts.snapauthor-feed.test.ts.snapfeedgen.test.ts.snapfollows.test.ts.snaplikes.test.ts.snapnotifications.test.ts.snapposts.test.ts.snapprofile.test.ts.snapreposts.test.ts.snapthread.test.ts.snaptimeline.test.ts.snap
actor-search.test.tsauthor-feed.test.tsfollows.test.tslikes.test.tsnotifications.test.tspopular.test.tsposts.test.tsprofile.test.tsreposts.test.tssuggestions.test.tsthread.test.tstimeline.test.ts@ -13,6 +13,7 @@ export default function (server: Server, ctx: AppContext) {
|
||||
const { ref } = db.dynamic
|
||||
|
||||
const feedService = ctx.services.feed(ctx.db)
|
||||
const graphService = ctx.services.graph(ctx.db)
|
||||
|
||||
let did = ''
|
||||
if (actor.startsWith('did:')) {
|
||||
@ -28,11 +29,21 @@ export default function (server: Server, ctx: AppContext) {
|
||||
}
|
||||
}
|
||||
|
||||
// @NOTE mutes applied on pds
|
||||
let feedItemsQb = feedService
|
||||
.selectFeedItemQb()
|
||||
.where('originatorDid', '=', did)
|
||||
|
||||
if (viewer !== null) {
|
||||
feedItemsQb = feedItemsQb.where((qb) =>
|
||||
// Hide reposts of muted content
|
||||
qb
|
||||
.where('type', '=', 'post')
|
||||
.orWhere((qb) =>
|
||||
graphService.whereNotMuted(qb, viewer, [ref('post.creator')]),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
const keyset = new FeedKeyset(
|
||||
ref('feed_item.sortAt'),
|
||||
ref('feed_item.cid'),
|
||||
|
@ -19,6 +19,7 @@ export default function (server: Server, ctx: AppContext) {
|
||||
}
|
||||
|
||||
const feedService = ctx.services.feed(ctx.db)
|
||||
const graphService = ctx.services.graph(ctx.db)
|
||||
|
||||
const followingIdsSubquery = db
|
||||
.selectFrom('follow')
|
||||
@ -31,7 +32,6 @@ export default function (server: Server, ctx: AppContext) {
|
||||
)
|
||||
const sortFrom = keyset.unpack(cursor)?.primary
|
||||
|
||||
// @NOTE mutes applied on pds
|
||||
let feedItemsQb = feedService
|
||||
.selectFeedItemQb()
|
||||
.where((qb) =>
|
||||
@ -39,6 +39,13 @@ export default function (server: Server, ctx: AppContext) {
|
||||
.where('originatorDid', '=', viewer)
|
||||
.orWhere('originatorDid', 'in', followingIdsSubquery),
|
||||
)
|
||||
.where((qb) =>
|
||||
// Hide posts and reposts of or by muted actors
|
||||
graphService.whereNotMuted(qb, viewer, [
|
||||
ref('post.creator'),
|
||||
ref('originatorDid'),
|
||||
]),
|
||||
)
|
||||
.where('feed_item.sortAt', '>', getFeedDateThreshold(sortFrom))
|
||||
|
||||
feedItemsQb = paginate(feedItemsQb, {
|
||||
|
55
packages/bsky/src/api/app/bsky/graph/getMutes.ts
Normal file
55
packages/bsky/src/api/app/bsky/graph/getMutes.ts
Normal file
@ -0,0 +1,55 @@
|
||||
import { Server } from '../../../../lexicon'
|
||||
import { paginate, TimeCidKeyset } from '../../../../db/pagination'
|
||||
import AppContext from '../../../../context'
|
||||
import { notSoftDeletedClause } from '../../../../db/util'
|
||||
|
||||
export default function (server: Server, ctx: AppContext) {
|
||||
server.app.bsky.graph.getMutes({
|
||||
auth: ctx.authVerifier,
|
||||
handler: async ({ params, auth }) => {
|
||||
const { limit, cursor } = params
|
||||
const requester = auth.credentials.did
|
||||
const { services, db } = ctx
|
||||
const { ref } = ctx.db.db.dynamic
|
||||
|
||||
let mutesReq = ctx.db.db
|
||||
.selectFrom('mute')
|
||||
.innerJoin('actor', 'actor.did', 'mute.subjectDid')
|
||||
.where(notSoftDeletedClause(ref('actor')))
|
||||
.where('mute.mutedByDid', '=', requester)
|
||||
.selectAll('actor')
|
||||
.select('mute.createdAt as createdAt')
|
||||
|
||||
const keyset = new CreatedAtDidKeyset(
|
||||
ref('mute.createdAt'),
|
||||
ref('mute.subjectDid'),
|
||||
)
|
||||
mutesReq = paginate(mutesReq, {
|
||||
limit,
|
||||
cursor,
|
||||
keyset,
|
||||
})
|
||||
|
||||
const mutesRes = await mutesReq.execute()
|
||||
|
||||
const actorService = services.actor(db)
|
||||
|
||||
return {
|
||||
encoding: 'application/json',
|
||||
body: {
|
||||
cursor: keyset.packFromResult(mutesRes),
|
||||
mutes: await actorService.views.profile(mutesRes, requester),
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export class CreatedAtDidKeyset extends TimeCidKeyset<{
|
||||
createdAt: string
|
||||
did: string // dids are treated identically to cids in TimeCidKeyset
|
||||
}> {
|
||||
labelResult(result: { createdAt: string; did: string }) {
|
||||
return { primary: result.createdAt, secondary: result.did }
|
||||
}
|
||||
}
|
27
packages/bsky/src/api/app/bsky/graph/muteActor.ts
Normal file
27
packages/bsky/src/api/app/bsky/graph/muteActor.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { InvalidRequestError } from '@atproto/xrpc-server'
|
||||
import { Server } from '../../../../lexicon'
|
||||
import AppContext from '../../../../context'
|
||||
|
||||
export default function (server: Server, ctx: AppContext) {
|
||||
server.app.bsky.graph.muteActor({
|
||||
auth: ctx.authVerifier,
|
||||
handler: async ({ auth, input }) => {
|
||||
const { actor } = input.body
|
||||
const requester = auth.credentials.did
|
||||
const { db, services } = ctx
|
||||
|
||||
const subjectDid = await services.actor(db).getActorDid(actor)
|
||||
if (!subjectDid) {
|
||||
throw new InvalidRequestError(`Actor not found: ${actor}`)
|
||||
}
|
||||
if (subjectDid === requester) {
|
||||
throw new InvalidRequestError('Cannot mute oneself')
|
||||
}
|
||||
|
||||
await services.graph(db).muteActor({
|
||||
subjectDid,
|
||||
mutedByDid: requester,
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
27
packages/bsky/src/api/app/bsky/graph/unmuteActor.ts
Normal file
27
packages/bsky/src/api/app/bsky/graph/unmuteActor.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { InvalidRequestError } from '@atproto/xrpc-server'
|
||||
import { Server } from '../../../../lexicon'
|
||||
import AppContext from '../../../../context'
|
||||
|
||||
export default function (server: Server, ctx: AppContext) {
|
||||
server.app.bsky.graph.unmuteActor({
|
||||
auth: ctx.authVerifier,
|
||||
handler: async ({ auth, input }) => {
|
||||
const { actor } = input.body
|
||||
const requester = auth.credentials.did
|
||||
const { db, services } = ctx
|
||||
|
||||
const subjectDid = await services.actor(db).getActorDid(actor)
|
||||
if (!subjectDid) {
|
||||
throw new InvalidRequestError(`Actor not found: ${actor}`)
|
||||
}
|
||||
if (subjectDid === requester) {
|
||||
throw new InvalidRequestError('Cannot mute oneself')
|
||||
}
|
||||
|
||||
await services.graph(db).unmuteActor({
|
||||
subjectDid,
|
||||
mutedByDid: requester,
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
@ -12,6 +12,8 @@ export default function (server: Server, ctx: AppContext) {
|
||||
const requester = auth.credentials.did
|
||||
const { seenAt } = params
|
||||
|
||||
const graphService = ctx.services.graph(ctx.db)
|
||||
|
||||
const { ref } = ctx.db.db.dynamic
|
||||
let notifBuilder = ctx.db.db
|
||||
.selectFrom('notification as notif')
|
||||
@ -20,6 +22,9 @@ export default function (server: Server, ctx: AppContext) {
|
||||
.where(notSoftDeletedClause(ref('record')))
|
||||
.where(notSoftDeletedClause(ref('author')))
|
||||
.where('notif.did', '=', requester)
|
||||
.where((qb) =>
|
||||
graphService.whereNotMuted(qb, requester, [ref('notif.author')]),
|
||||
)
|
||||
.where((clause) =>
|
||||
clause
|
||||
.where('reasonSubject', 'is', null)
|
||||
|
@ -1,72 +1,9 @@
|
||||
import { sql } from 'kysely'
|
||||
import { Server } from '../../../lexicon'
|
||||
import { FeedKeyset } from './util/feed'
|
||||
import { paginate } from '../../../db/pagination'
|
||||
import AppContext from '../../../context'
|
||||
import { FeedRow, FeedItemType } from '../../../services/types'
|
||||
import { countAll } from '../../../db/util'
|
||||
|
||||
// THIS IS A TEMPORARY UNSPECCED ROUTE
|
||||
export default function (server: Server, ctx: AppContext) {
|
||||
server.app.bsky.unspecced.getPopular({
|
||||
auth: ctx.authOptionalVerifier,
|
||||
handler: async ({ params, auth }) => {
|
||||
const { limit, cursor } = params
|
||||
const viewer = auth.credentials.did
|
||||
const db = ctx.db.db
|
||||
const { ref } = db.dynamic
|
||||
|
||||
const feedService = ctx.services.feed(ctx.db)
|
||||
|
||||
// @TODO sync-up with pds, apply mutes and blocks
|
||||
const postsQb = ctx.db.db
|
||||
.selectFrom('post')
|
||||
.leftJoin('repost', (join) =>
|
||||
// this works well for one curating user. reassess if adding more
|
||||
join
|
||||
.on('repost.creator', '=', 'did:plc:ea2eqamjmtuo6f4rvhl3g6ne')
|
||||
.onRef('repost.subject', '=', 'post.uri'),
|
||||
)
|
||||
.where(
|
||||
(qb) =>
|
||||
qb
|
||||
.selectFrom('like')
|
||||
.whereRef('like.subject', '=', 'post.uri')
|
||||
.select(countAll.as('count')),
|
||||
'>=',
|
||||
5,
|
||||
)
|
||||
.orWhere('repost.creator', 'is not', null)
|
||||
.select([
|
||||
sql<FeedItemType>`${'post'}`.as('type'),
|
||||
'post.uri as uri',
|
||||
'post.cid as cid',
|
||||
'post.uri as postUri',
|
||||
'post.creator as postAuthorDid',
|
||||
'post.creator as originatorDid',
|
||||
'post.replyParent as replyParent',
|
||||
'post.replyRoot as replyRoot',
|
||||
'post.indexedAt as sortAt',
|
||||
])
|
||||
|
||||
const keyset = new FeedKeyset(ref('sortAt'), ref('cid'))
|
||||
|
||||
let feedQb = ctx.db.db.selectFrom(postsQb.as('feed_items')).selectAll()
|
||||
feedQb = paginate(feedQb, { limit, cursor, keyset })
|
||||
|
||||
const feedItems: FeedRow[] = await feedQb.execute()
|
||||
const feed = await feedService.hydrateFeed(feedItems, viewer)
|
||||
|
||||
return {
|
||||
encoding: 'application/json',
|
||||
body: {
|
||||
feed,
|
||||
cursor: keyset.packFromResult(feedItems),
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
server.app.bsky.unspecced.getPopularFeedGenerators({
|
||||
auth: ctx.authOptionalVerifier,
|
||||
handler: async ({ auth }) => {
|
||||
|
@ -18,6 +18,9 @@ import getFollows from './app/bsky/graph/getFollows'
|
||||
import getList from './app/bsky/graph/getList'
|
||||
import getLists from './app/bsky/graph/getLists'
|
||||
import getListMutes from './app/bsky/graph/getListMutes'
|
||||
import getMutes from './app/bsky/graph/getMutes'
|
||||
import muteActor from './app/bsky/graph/muteActor'
|
||||
import unmuteActor from './app/bsky/graph/unmuteActor'
|
||||
import muteActorList from './app/bsky/graph/muteActorList'
|
||||
import unmuteActorList from './app/bsky/graph/unmuteActorList'
|
||||
import searchActors from './app/bsky/actor/searchActors'
|
||||
@ -63,6 +66,9 @@ export default function (server: Server, ctx: AppContext) {
|
||||
getList(server, ctx)
|
||||
getLists(server, ctx)
|
||||
getListMutes(server, ctx)
|
||||
getMutes(server, ctx)
|
||||
muteActor(server, ctx)
|
||||
unmuteActor(server, ctx)
|
||||
muteActorList(server, ctx)
|
||||
unmuteActorList(server, ctx)
|
||||
searchActors(server, ctx)
|
||||
|
@ -13,6 +13,7 @@ import * as like from './tables/like'
|
||||
import * as list from './tables/list'
|
||||
import * as listItem from './tables/list-item'
|
||||
import * as listMute from './tables/list-mute'
|
||||
import * as mute from './tables/mute'
|
||||
import * as feedGenerator from './tables/feed-generator'
|
||||
import * as subscription from './tables/subscription'
|
||||
import * as actor from './tables/actor'
|
||||
@ -39,6 +40,7 @@ export type DatabaseSchemaType = duplicateRecord.PartialDB &
|
||||
list.PartialDB &
|
||||
listItem.PartialDB &
|
||||
listMute.PartialDB &
|
||||
mute.PartialDB &
|
||||
feedGenerator.PartialDB &
|
||||
subscription.PartialDB &
|
||||
actor.PartialDB &
|
||||
|
15
packages/bsky/src/db/migrations/20230608T205147239Z-mutes.ts
Normal file
15
packages/bsky/src/db/migrations/20230608T205147239Z-mutes.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { Kysely } from 'kysely'
|
||||
|
||||
export async function up(db: Kysely<unknown>): Promise<void> {
|
||||
await db.schema
|
||||
.createTable('mute')
|
||||
.addColumn('subjectDid', 'varchar', (col) => col.notNull())
|
||||
.addColumn('mutedByDid', 'varchar', (col) => col.notNull())
|
||||
.addColumn('createdAt', 'varchar', (col) => col.notNull())
|
||||
.addPrimaryKeyConstraint('mute_pkey', ['mutedByDid', 'subjectDid'])
|
||||
.execute()
|
||||
}
|
||||
|
||||
export async function down(db: Kysely<unknown>): Promise<void> {
|
||||
await db.schema.dropTable('mute').execute()
|
||||
}
|
@ -11,3 +11,4 @@ export * as _20230605T144730094Z from './20230605T144730094Z-post-profile-aggs'
|
||||
export * as _20230607T211442112Z from './20230607T211442112Z-feed-generator-init'
|
||||
export * as _20230608T155101190Z from './20230608T155101190Z-algo-whats-hot-view'
|
||||
export * as _20230608T201813132Z from './20230608T201813132Z-mute-lists'
|
||||
export * as _20230608T205147239Z from './20230608T205147239Z-mutes'
|
||||
|
9
packages/bsky/src/db/tables/mute.ts
Normal file
9
packages/bsky/src/db/tables/mute.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export interface Mute {
|
||||
subjectDid: string
|
||||
mutedByDid: string
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export const tableName = 'mute'
|
||||
|
||||
export type PartialDB = { [tableName]: Mute }
|
@ -15,6 +15,14 @@ export class ActorService {
|
||||
|
||||
views = new ActorViews(this.db, this.imgUriBuilder)
|
||||
|
||||
async getActorDid(handleOrDid: string): Promise<string | null> {
|
||||
if (handleOrDid.startsWith('did:')) {
|
||||
return handleOrDid
|
||||
}
|
||||
const subject = await this.getActor(handleOrDid, true)
|
||||
return subject?.did ?? null
|
||||
}
|
||||
|
||||
async getActor(
|
||||
handleOrDid: string,
|
||||
includeSoftDeleted = false,
|
||||
|
@ -9,6 +9,7 @@ import { noMatch } from '../../db/util'
|
||||
import { Actor } from '../../db/tables/actor'
|
||||
import { ImageUriBuilder } from '../../image/uri'
|
||||
import { LabelService } from '../label'
|
||||
import { ListViewBasic } from '../../lexicon/types/app/bsky/graph/defs'
|
||||
|
||||
export class ActorViews {
|
||||
constructor(private db: Database, private imgUriBuilder: ImageUriBuilder) {}
|
||||
@ -65,11 +66,19 @@ export class ActorViews {
|
||||
.where('subjectDid', '=', viewer ?? '')
|
||||
.select('uri')
|
||||
.as('requesterFollowedBy'),
|
||||
this.db.db
|
||||
.selectFrom('mute')
|
||||
.if(!viewer, (q) => q.where(noMatch))
|
||||
.whereRef('subjectDid', '=', ref('actor.did'))
|
||||
.where('mutedByDid', '=', viewer ?? '')
|
||||
.select('subjectDid')
|
||||
.as('requesterMuted'),
|
||||
])
|
||||
|
||||
const [profileInfos, labels] = await Promise.all([
|
||||
const [profileInfos, labels, listMutes] = await Promise.all([
|
||||
profileInfosQb.execute(),
|
||||
this.services.label(this.db).getLabelsForSubjects(dids),
|
||||
this.getListMutes(dids, viewer),
|
||||
])
|
||||
|
||||
const profileInfoByDid = profileInfos.reduce((acc, info) => {
|
||||
@ -107,7 +116,8 @@ export class ActorViews {
|
||||
? {
|
||||
following: profileInfo?.requesterFollowing || undefined,
|
||||
followedBy: profileInfo?.requesterFollowedBy || undefined,
|
||||
// muted field hydrated on pds
|
||||
muted: !!profileInfo?.requesterMuted || !!listMutes[result.did],
|
||||
mutedByList: listMutes[result.did],
|
||||
}
|
||||
: undefined,
|
||||
labels: labels[result.did] ?? [],
|
||||
@ -154,11 +164,19 @@ export class ActorViews {
|
||||
.where('subjectDid', '=', viewer ?? '')
|
||||
.select('uri')
|
||||
.as('requesterFollowedBy'),
|
||||
this.db.db
|
||||
.selectFrom('mute')
|
||||
.if(!viewer, (q) => q.where(noMatch))
|
||||
.whereRef('subjectDid', '=', ref('actor.did'))
|
||||
.where('mutedByDid', '=', viewer ?? '')
|
||||
.select('subjectDid')
|
||||
.as('requesterMuted'),
|
||||
])
|
||||
|
||||
const [profileInfos, labels] = await Promise.all([
|
||||
const [profileInfos, labels, listMutes] = await Promise.all([
|
||||
profileInfosQb.execute(),
|
||||
this.services.label(this.db).getLabelsForSubjects(dids),
|
||||
this.getListMutes(dids, viewer),
|
||||
])
|
||||
|
||||
const profileInfoByDid = profileInfos.reduce((acc, info) => {
|
||||
@ -183,6 +201,8 @@ export class ActorViews {
|
||||
indexedAt: profileInfo?.indexedAt || undefined,
|
||||
viewer: viewer
|
||||
? {
|
||||
muted: !!profileInfo?.requesterMuted || !!listMutes[result.did],
|
||||
mutedByList: listMutes[result.did],
|
||||
following: profileInfo?.requesterFollowing || undefined,
|
||||
followedBy: profileInfo?.requesterFollowedBy || undefined,
|
||||
// muted field hydrated on pds
|
||||
@ -222,6 +242,45 @@ export class ActorViews {
|
||||
|
||||
return Array.isArray(result) ? views : views[0]
|
||||
}
|
||||
|
||||
async getListMutes(
|
||||
subjects: string[],
|
||||
mutedBy: string | null,
|
||||
): Promise<Record<string, ListViewBasic>> {
|
||||
if (mutedBy === null) return {}
|
||||
if (subjects.length < 1) return {}
|
||||
const res = await this.db.db
|
||||
.selectFrom('list_item')
|
||||
.innerJoin('list_mute', 'list_mute.listUri', 'list_item.listUri')
|
||||
.innerJoin('list', 'list.uri', 'list_item.listUri')
|
||||
.where('list_mute.mutedByDid', '=', mutedBy)
|
||||
.where('list_item.subjectDid', 'in', subjects)
|
||||
.selectAll('list')
|
||||
.select('list_item.subjectDid as subjectDid')
|
||||
.execute()
|
||||
return res.reduce(
|
||||
(acc, cur) => ({
|
||||
...acc,
|
||||
[cur.subjectDid]: {
|
||||
uri: cur.uri,
|
||||
name: cur.name,
|
||||
purpose: cur.purpose,
|
||||
avatar: cur.avatarCid
|
||||
? this.imgUriBuilder.getCommonSignedUri(
|
||||
'avatar',
|
||||
cur.creator,
|
||||
cur.avatarCid,
|
||||
)
|
||||
: undefined,
|
||||
viewer: {
|
||||
muted: true,
|
||||
},
|
||||
indexedAt: cur.indexedAt,
|
||||
},
|
||||
}),
|
||||
{} as Record<string, ListViewBasic>,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
type ActorResult = Actor
|
||||
|
@ -11,7 +11,6 @@ import {
|
||||
ViewRecord,
|
||||
View as RecordEmbedView,
|
||||
} from '../../lexicon/types/app/bsky/embed/record'
|
||||
import { FeedViewPost } from '../../lexicon/types/app/bsky/feed/defs'
|
||||
import {
|
||||
ActorViewMap,
|
||||
FeedEmbeds,
|
||||
@ -20,8 +19,10 @@ import {
|
||||
FeedRow,
|
||||
} from '../types'
|
||||
import { LabelService } from '../label'
|
||||
import { ActorService } from '../actor'
|
||||
import { FeedViews } from './views'
|
||||
import { FeedGenInfoMap } from './types'
|
||||
import { FeedViewPost } from '../../lexicon/types/app/bsky/feed/defs'
|
||||
|
||||
export class FeedService {
|
||||
constructor(public db: Database, public imgUriBuilder: ImageUriBuilder) {}
|
||||
@ -29,7 +30,8 @@ export class FeedService {
|
||||
views = new FeedViews(this.db, this.imgUriBuilder)
|
||||
|
||||
services = {
|
||||
label: LabelService.creator(),
|
||||
label: LabelService.creator()(this.db),
|
||||
actor: ActorService.creator(this.imgUriBuilder)(this.db),
|
||||
}
|
||||
|
||||
static creator(imgUriBuilder: ImageUriBuilder) {
|
||||
@ -103,6 +105,7 @@ export class FeedService {
|
||||
)
|
||||
}
|
||||
|
||||
// @TODO just use actor service??
|
||||
// @NOTE keep in sync with actorService.views.profile()
|
||||
async getActorViews(
|
||||
dids: string[],
|
||||
@ -112,7 +115,7 @@ export class FeedService {
|
||||
if (dids.length < 1) return {}
|
||||
const { ref } = this.db.db.dynamic
|
||||
const { skipLabels } = opts ?? {}
|
||||
const [actors, labels] = await Promise.all([
|
||||
const [actors, labels, listMutes] = await Promise.all([
|
||||
this.db.db
|
||||
.selectFrom('actor')
|
||||
.where('actor.did', 'in', dids)
|
||||
@ -138,9 +141,17 @@ export class FeedService {
|
||||
.where('subjectDid', '=', viewer ?? '')
|
||||
.select('uri')
|
||||
.as('requesterFollowedBy'),
|
||||
this.db.db
|
||||
.selectFrom('mute')
|
||||
.if(!viewer, (q) => q.where(noMatch))
|
||||
.whereRef('subjectDid', '=', ref('actor.did'))
|
||||
.where('mutedByDid', '=', viewer ?? '')
|
||||
.select('subjectDid')
|
||||
.as('requesterMuted'),
|
||||
])
|
||||
.execute(),
|
||||
this.services.label(this.db).getLabelsForSubjects(skipLabels ? [] : dids),
|
||||
this.services.label.getLabelsForSubjects(skipLabels ? [] : dids),
|
||||
this.services.actor.views.getListMutes(dids, viewer),
|
||||
])
|
||||
return actors.reduce((acc, cur) => {
|
||||
const actorLabels = labels[cur.did] ?? []
|
||||
@ -159,9 +170,10 @@ export class FeedService {
|
||||
: undefined,
|
||||
viewer: viewer
|
||||
? {
|
||||
muted: !!cur?.requesterMuted || !!listMutes[cur.did],
|
||||
mutedByList: listMutes[cur.did],
|
||||
following: cur?.requesterFollowing || undefined,
|
||||
followedBy: cur?.requesterFollowedBy || undefined,
|
||||
// muted field hydrated on pds
|
||||
}
|
||||
: undefined,
|
||||
labels: skipLabels ? undefined : actorLabels,
|
||||
@ -281,9 +293,10 @@ export class FeedService {
|
||||
this.getPostViews(nestedPostUris, viewer),
|
||||
this.getActorViews(nestedDids, viewer, { skipLabels: true }),
|
||||
this.embedsForPosts(nestedUris, viewer, _depth + 1),
|
||||
this.services
|
||||
.label(this.db)
|
||||
.getLabelsForSubjects([...nestedUris, ...nestedDids]),
|
||||
this.services.label.getLabelsForSubjects([
|
||||
...nestedUris,
|
||||
...nestedDids,
|
||||
]),
|
||||
this.getFeedGeneratorViews(nestedFeedGenUris, viewer),
|
||||
])
|
||||
let embeds = images.reduce((acc, cur) => {
|
||||
@ -428,9 +441,7 @@ export class FeedService {
|
||||
}),
|
||||
this.getPostViews(Array.from(postUris), viewer),
|
||||
this.embedsForPosts(Array.from(postUris), viewer),
|
||||
this.services
|
||||
.label(this.db)
|
||||
.getLabelsForSubjects([...postUris, ...actorDids]),
|
||||
this.services.label.getLabelsForSubjects([...postUris, ...actorDids]),
|
||||
])
|
||||
|
||||
return this.views.formatFeed(
|
||||
|
@ -2,7 +2,9 @@ import Database from '../../db'
|
||||
import { ImageUriBuilder } from '../../image/uri'
|
||||
import { ProfileView } from '../../lexicon/types/app/bsky/actor/defs'
|
||||
import { List } from '../../db/tables/list'
|
||||
import { Selectable } from 'kysely'
|
||||
import { Selectable, WhereInterface, sql } from 'kysely'
|
||||
import { NotEmptyArray } from '@atproto/common'
|
||||
import { DbRef } from '../../db/util'
|
||||
|
||||
export class GraphService {
|
||||
constructor(public db: Database, public imgUriBuilder: ImageUriBuilder) {}
|
||||
@ -11,6 +13,32 @@ export class GraphService {
|
||||
return (db: Database) => new GraphService(db, imgUriBuilder)
|
||||
}
|
||||
|
||||
async muteActor(info: {
|
||||
subjectDid: string
|
||||
mutedByDid: string
|
||||
createdAt?: Date
|
||||
}) {
|
||||
const { subjectDid, mutedByDid, createdAt = new Date() } = info
|
||||
await this.db.db
|
||||
.insertInto('mute')
|
||||
.values({
|
||||
subjectDid,
|
||||
mutedByDid,
|
||||
createdAt: createdAt.toISOString(),
|
||||
})
|
||||
.onConflict((oc) => oc.doNothing())
|
||||
.execute()
|
||||
}
|
||||
|
||||
async unmuteActor(info: { subjectDid: string; mutedByDid: string }) {
|
||||
const { subjectDid, mutedByDid } = info
|
||||
await this.db.db
|
||||
.deleteFrom('mute')
|
||||
.where('subjectDid', '=', subjectDid)
|
||||
.where('mutedByDid', '=', mutedByDid)
|
||||
.execute()
|
||||
}
|
||||
|
||||
async muteActorList(info: {
|
||||
list: string
|
||||
mutedByDid: string
|
||||
@ -37,6 +65,27 @@ export class GraphService {
|
||||
.execute()
|
||||
}
|
||||
|
||||
whereNotMuted<W extends WhereInterface<any, any>>(
|
||||
qb: W,
|
||||
requester: string,
|
||||
refs: NotEmptyArray<DbRef>,
|
||||
) {
|
||||
const subjectRefs = sql.join(refs)
|
||||
const actorMute = this.db.db
|
||||
.selectFrom('mute')
|
||||
.where('mutedByDid', '=', requester)
|
||||
.where('subjectDid', 'in', sql`(${subjectRefs})`)
|
||||
.select('subjectDid as muted')
|
||||
const listMute = this.db.db
|
||||
.selectFrom('list_item')
|
||||
.innerJoin('list_mute', 'list_mute.listUri', 'list_item.listUri')
|
||||
.where('list_mute.mutedByDid', '=', requester)
|
||||
.whereRef('list_item.subjectDid', 'in', sql`(${subjectRefs})`)
|
||||
.select('list_item.subjectDid as muted')
|
||||
// Splitting the mute from list-mute checks seems to be more flexible for the query-planner and often quicker
|
||||
return qb.whereNotExists(actorMute).whereNotExists(listMute)
|
||||
}
|
||||
|
||||
getListsQb(viewer: string | null) {
|
||||
const { ref } = this.db.db.dynamic
|
||||
return this.db.db
|
||||
|
@ -9,7 +9,9 @@ Object {
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"embed": Object {
|
||||
@ -26,6 +28,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "Provides all feed candidates",
|
||||
@ -76,6 +79,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "Provides odd-indexed feed candidates",
|
||||
@ -99,6 +103,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "Provides all feed candidates, blindly ignoring pagination limit",
|
||||
@ -122,6 +127,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "Provides even-indexed feed candidates",
|
||||
@ -145,6 +151,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "Provides all feed candidates",
|
||||
@ -171,7 +178,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -200,6 +209,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -227,6 +237,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -259,6 +270,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -336,6 +348,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -371,7 +384,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -395,7 +410,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -422,6 +439,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(11)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -436,6 +454,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -469,6 +488,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -573,6 +593,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -592,7 +613,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -619,6 +642,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -651,6 +675,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
@ -728,6 +753,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -763,7 +789,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -787,7 +815,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -823,6 +853,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "Provides all feed candidates",
|
||||
@ -852,6 +883,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "Provides all feed candidates",
|
||||
@ -875,6 +907,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "Provides even-indexed feed candidates",
|
||||
|
@ -11,7 +11,9 @@ Array [
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"postsCount": 5,
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
@ -23,7 +25,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -47,7 +51,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(1)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -85,6 +91,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -160,7 +167,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -185,7 +194,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
"embed": Object {
|
||||
@ -198,6 +209,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(8)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -212,6 +224,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(10)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -330,7 +343,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -354,7 +369,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(11)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -382,6 +399,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(8)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -395,6 +413,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -404,7 +423,9 @@ Array [
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
@ -422,7 +443,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -469,7 +492,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -544,7 +569,9 @@ Object {
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"postsCount": 0,
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
@ -558,7 +585,9 @@ Object {
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"postsCount": 0,
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
@ -570,6 +599,8 @@ Object {
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"postsCount": 0,
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
@ -9,7 +9,6 @@ import { InputSchema as CreateReportInput } from '@atproto/api/src/client/types/
|
||||
import { Record as PostRecord } from '@atproto/api/src/client/types/app/bsky/feed/post'
|
||||
import { Record as LikeRecord } from '@atproto/api/src/client/types/app/bsky/feed/like'
|
||||
import { Record as FollowRecord } from '@atproto/api/src/client/types/app/bsky/graph/follow'
|
||||
import { adminAuth } from '../_util'
|
||||
|
||||
// Makes it simple to create data via the XRPC client,
|
||||
// and keeps track of all created data in memory for convenience.
|
||||
@ -77,7 +76,7 @@ export class SeedClient {
|
||||
reposts: Record<string, RecordRef[]>
|
||||
dids: Record<string, string>
|
||||
|
||||
constructor(public agent: AtpAgent) {
|
||||
constructor(public agent: AtpAgent, public adminAuth?: string) {
|
||||
this.accounts = {}
|
||||
this.profiles = {}
|
||||
this.follows = {}
|
||||
@ -168,6 +167,18 @@ export class SeedClient {
|
||||
return this.follows[from][to]
|
||||
}
|
||||
|
||||
async unfollow(from: string, to: string) {
|
||||
const follow = this.follows[from][to]
|
||||
if (!follow) {
|
||||
throw new Error('follow does not exist')
|
||||
}
|
||||
await this.agent.api.app.bsky.graph.follow.delete(
|
||||
{ repo: from, rkey: follow.uri.rkey },
|
||||
this.getHeaders(from),
|
||||
)
|
||||
delete this.follows[from][to]
|
||||
}
|
||||
|
||||
async post(
|
||||
by: string,
|
||||
text: string,
|
||||
@ -308,6 +319,9 @@ export class SeedClient {
|
||||
reason?: string
|
||||
createdBy?: string
|
||||
}) {
|
||||
if (!this.adminAuth) {
|
||||
throw new Error('No admin auth provided to seed client')
|
||||
}
|
||||
const {
|
||||
action,
|
||||
subject,
|
||||
@ -318,7 +332,7 @@ export class SeedClient {
|
||||
{ action, subject, createdBy, reason },
|
||||
{
|
||||
encoding: 'application/json',
|
||||
headers: { authorization: adminAuth() },
|
||||
headers: { authorization: this.adminAuth },
|
||||
},
|
||||
)
|
||||
return result.data
|
||||
@ -329,13 +343,17 @@ export class SeedClient {
|
||||
reason?: string
|
||||
createdBy?: string
|
||||
}) {
|
||||
if (!this.adminAuth) {
|
||||
throw new Error('No admin auth provided to seed client')
|
||||
}
|
||||
|
||||
const { id, reason = 'X', createdBy = 'did:example:admin' } = opts
|
||||
const result =
|
||||
await this.agent.api.com.atproto.admin.reverseModerationAction(
|
||||
{ id, reason, createdBy },
|
||||
{
|
||||
encoding: 'application/json',
|
||||
headers: { authorization: adminAuth() },
|
||||
headers: { authorization: this.adminAuth },
|
||||
},
|
||||
)
|
||||
return result.data
|
||||
@ -346,13 +364,17 @@ export class SeedClient {
|
||||
reportIds: number[]
|
||||
createdBy?: string
|
||||
}) {
|
||||
if (!this.adminAuth) {
|
||||
throw new Error('No admin auth provided to seed client')
|
||||
}
|
||||
|
||||
const { actionId, reportIds, createdBy = 'did:example:admin' } = opts
|
||||
const result =
|
||||
await this.agent.api.com.atproto.admin.resolveModerationReports(
|
||||
{ actionId, createdBy, reportIds },
|
||||
{
|
||||
encoding: 'application/json',
|
||||
headers: { authorization: adminAuth() },
|
||||
headers: { authorization: this.adminAuth },
|
||||
},
|
||||
)
|
||||
return result.data
|
||||
|
@ -6,7 +6,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "cara-wiegand69.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(2)/cids(0)@jpeg",
|
||||
@ -15,7 +17,9 @@ Array [
|
||||
"handle": "eudora-dietrich4.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(0)@jpeg",
|
||||
@ -24,7 +28,9 @@ Array [
|
||||
"handle": "shane-torphy52.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(6)/cids(0)@jpeg",
|
||||
@ -33,13 +39,17 @@ Array [
|
||||
"handle": "aliya-hodkiewicz.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(7)",
|
||||
"handle": "carlos6.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(9)/cids(0)@jpeg",
|
||||
@ -48,7 +58,9 @@ Array [
|
||||
"handle": "carolina-mcdermott77.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(11)/cids(0)@jpeg",
|
||||
@ -57,7 +69,9 @@ Array [
|
||||
"handle": "cayla-marquardt39.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
||||
@ -67,47 +81,61 @@ Array [
|
||||
Object {
|
||||
"did": "user(0)",
|
||||
"handle": "cara-wiegand69.test",
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(2)/cids(0)@jpeg",
|
||||
"did": "user(1)",
|
||||
"displayName": "Carol Littel",
|
||||
"handle": "eudora-dietrich4.test",
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(0)@jpeg",
|
||||
"did": "user(3)",
|
||||
"displayName": "Sadie Carter",
|
||||
"handle": "shane-torphy52.test",
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(6)/cids(0)@jpeg",
|
||||
"did": "user(5)",
|
||||
"displayName": "Carlton Abernathy IV",
|
||||
"handle": "aliya-hodkiewicz.test",
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(7)",
|
||||
"handle": "carlos6.test",
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(9)/cids(0)@jpeg",
|
||||
"did": "user(8)",
|
||||
"displayName": "Latoya Windler",
|
||||
"handle": "carolina-mcdermott77.test",
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(11)/cids(0)@jpeg",
|
||||
"did": "user(10)",
|
||||
"displayName": "Rachel Kshlerin",
|
||||
"handle": "cayla-marquardt39.test",
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
@ -11,7 +11,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -49,6 +51,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -126,7 +129,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -153,7 +158,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
"embed": Object {
|
||||
@ -166,6 +173,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -181,6 +189,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(10)",
|
||||
"following": "record(9)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -301,7 +310,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -327,7 +338,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(10)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -358,7 +371,9 @@ Array [
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"embed": Object {
|
||||
@ -439,6 +454,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -468,6 +484,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -497,7 +514,9 @@ Array [
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -523,7 +542,9 @@ Array [
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -552,7 +573,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"embed": Object {
|
||||
@ -563,7 +586,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(1)",
|
||||
"embeds": Array [
|
||||
@ -595,6 +620,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -698,7 +724,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
},
|
||||
@ -710,7 +738,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -748,6 +778,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -777,6 +808,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -804,7 +836,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(1)",
|
||||
"embed": Object {
|
||||
@ -835,6 +869,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -916,6 +951,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -941,7 +977,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
},
|
||||
@ -953,7 +991,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"embed": Object {
|
||||
@ -964,7 +1004,9 @@ Array [
|
||||
"did": "user(3)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embeds": Array [
|
||||
@ -996,6 +1038,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -1099,7 +1142,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1133,6 +1178,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -1170,6 +1216,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -1250,6 +1297,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -1282,6 +1330,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
@ -1293,7 +1342,9 @@ Array [
|
||||
"did": "user(4)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
"embeds": Array [
|
||||
@ -1305,7 +1356,9 @@ Array [
|
||||
"did": "user(5)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1430,6 +1483,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -1461,6 +1515,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(10)",
|
||||
|
@ -15,6 +15,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -28,6 +29,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -41,6 +43,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -54,6 +57,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -65,7 +69,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
@ -85,6 +91,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -95,7 +102,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
@ -109,6 +118,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -129,6 +139,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -142,6 +153,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -152,7 +164,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
@ -166,6 +180,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -183,7 +198,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
@ -197,6 +214,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -217,6 +235,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -227,7 +246,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
@ -241,6 +262,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -261,6 +283,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -274,6 +297,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -287,6 +311,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -300,6 +325,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -311,7 +337,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
@ -331,6 +359,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -341,7 +370,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
@ -355,6 +386,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -372,7 +404,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
@ -386,6 +420,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -406,6 +441,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -419,6 +455,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -429,7 +466,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
@ -443,6 +482,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -463,6 +503,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -473,7 +514,9 @@ Object {
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
@ -487,6 +530,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -9,7 +9,9 @@ Object {
|
||||
"did": "user(0)",
|
||||
"handle": "eve.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -21,6 +23,7 @@ Object {
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -34,6 +37,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -51,6 +55,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -73,6 +78,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
|
@ -1,6 +1,186 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pds views with mutes from mute lists returns a users own list mutes 1`] = `
|
||||
exports[`bsky views with mutes from mute lists flags mutes in threads 1`] = `
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 3,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000000Z",
|
||||
"text": "again",
|
||||
},
|
||||
"replyCount": 2,
|
||||
"repostCount": 1,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {
|
||||
"like": "record(3)",
|
||||
"repost": "record(2)",
|
||||
},
|
||||
},
|
||||
"replies": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": true,
|
||||
"mutedByList": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"name": "alice mutes",
|
||||
"purpose": "app.bsky.graph.defs#modlist",
|
||||
"uri": "record(5)",
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "of course",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(4)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(1)@jpeg",
|
||||
"did": "user(3)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(9)",
|
||||
"muted": true,
|
||||
"mutedByList": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"name": "alice mutes",
|
||||
"purpose": "app.bsky.graph.defs#modlist",
|
||||
"uri": "record(5)",
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images#view",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(4)/cids(4)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(4)/cids(4)@jpeg",
|
||||
},
|
||||
],
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(8)",
|
||||
"val": "test-label",
|
||||
},
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(8)",
|
||||
"val": "test-label-2",
|
||||
},
|
||||
],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(4)",
|
||||
},
|
||||
"size": 4114,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "hear that label_me label_me_2",
|
||||
},
|
||||
"replyCount": 1,
|
||||
"repostCount": 0,
|
||||
"uri": "record(8)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`bsky views with mutes from mute lists returns a users own list mutes 1`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"lists": Array [
|
||||
@ -15,6 +195,7 @@ Object {
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "blah blah",
|
||||
@ -38,6 +219,7 @@ Object {
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "big list of mutes",
|
||||
@ -53,7 +235,7 @@ Object {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds views with mutes from mute lists returns lists associated with a user 1`] = `
|
||||
exports[`bsky views with mutes from mute lists returns lists associated with a user 1`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"lists": Array [
|
||||
@ -68,6 +250,7 @@ Object {
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "blah blah",
|
||||
@ -91,6 +274,7 @@ Object {
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "big list of mutes",
|
||||
@ -106,7 +290,7 @@ Object {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds views with mutes from mute lists returns the contents of a list 1`] = `
|
||||
exports[`bsky views with mutes from mute lists returns the contents of a list 1`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"items": Array [
|
||||
@ -117,44 +301,66 @@ Object {
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": true,
|
||||
"mutedByList": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"name": "alice mutes",
|
||||
"purpose": "app.bsky.graph.defs#modlist",
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(2)/cids(0)@jpeg",
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "hi im bob",
|
||||
"did": "user(1)",
|
||||
"did": "user(2)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(2)",
|
||||
"muted": true,
|
||||
"mutedByList": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"name": "alice mutes",
|
||||
"purpose": "app.bsky.graph.defs#modlist",
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"list": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(0)@jpeg",
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"creator": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(0)@jpeg",
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "its me!",
|
||||
"did": "user(3)",
|
||||
"did": "user(4)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"followedBy": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"description": "big list of mutes",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"name": "alice mutes",
|
||||
"purpose": "app.bsky.graph.defs#modlist",
|
||||
"uri": "record(3)",
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
|
248
packages/bsky/tests/views/__snapshots__/mutes.test.ts.snap
Normal file
248
packages/bsky/tests/views/__snapshots__/mutes.test.ts.snap
Normal file
@ -0,0 +1,248 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`mute views fetches mutes for the logged-in user. 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "Dr. Lowell DuBuque",
|
||||
"handle": "elta48.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"did": "user(2)",
|
||||
"displayName": "Sally Funk",
|
||||
"handle": "magnus53.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(4)",
|
||||
"handle": "nicolas-krajcik10.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(6)/cids(0)@jpeg",
|
||||
"did": "user(5)",
|
||||
"displayName": "Patrick Sawayn",
|
||||
"handle": "jeffrey-sawayn87.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(8)/cids(0)@jpeg",
|
||||
"did": "user(7)",
|
||||
"displayName": "Kim Streich",
|
||||
"handle": "adrienne49.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(10)/cids(0)@jpeg",
|
||||
"did": "user(9)",
|
||||
"displayName": "Carlton Abernathy IV",
|
||||
"handle": "aliya-hodkiewicz.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(11)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(0)",
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(13)/cids(0)@jpeg",
|
||||
"description": "hi im bob",
|
||||
"did": "user(12)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`mute views flags mutes in threads 1`] = `
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 3,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000000Z",
|
||||
"text": "again",
|
||||
},
|
||||
"replyCount": 2,
|
||||
"repostCount": 1,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "of course",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(1)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(1)@jpeg",
|
||||
"did": "user(3)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(5)",
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images#view",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(4)/cids(4)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(4)/cids(4)@jpeg",
|
||||
},
|
||||
],
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(4)",
|
||||
"val": "test-label",
|
||||
},
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(4)",
|
||||
"val": "test-label-2",
|
||||
},
|
||||
],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(4)",
|
||||
},
|
||||
"size": 4114,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "hear that label_me label_me_2",
|
||||
},
|
||||
"replyCount": 1,
|
||||
"repostCount": 0,
|
||||
"uri": "record(4)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
`;
|
@ -9,6 +9,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -34,6 +35,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -60,6 +62,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -82,6 +85,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -115,6 +119,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -141,6 +146,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -171,6 +177,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(11)",
|
||||
"following": "record(12)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
@ -197,6 +204,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(11)",
|
||||
"following": "record(12)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(11)",
|
||||
@ -267,6 +275,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(11)",
|
||||
"following": "record(12)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(13)",
|
||||
@ -297,6 +306,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(11)",
|
||||
"following": "record(12)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(14)",
|
||||
@ -327,6 +337,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -352,6 +363,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -394,6 +406,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -420,6 +433,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
@ -442,6 +456,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -475,6 +490,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -508,6 +524,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
@ -534,6 +551,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(11)",
|
||||
@ -564,6 +582,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(14)",
|
||||
"following": "record(15)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(12)",
|
||||
@ -590,6 +609,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(14)",
|
||||
"following": "record(15)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(14)",
|
||||
@ -660,6 +680,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(14)",
|
||||
"following": "record(15)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(16)",
|
||||
@ -690,6 +711,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(14)",
|
||||
"following": "record(15)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(17)",
|
||||
@ -718,7 +740,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -747,6 +771,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -772,6 +797,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
|
@ -10,7 +10,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -34,7 +36,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -61,6 +65,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -86,6 +91,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -118,6 +124,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -192,6 +199,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(10)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -206,6 +214,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -239,6 +248,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -342,7 +352,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
|
@ -16,6 +16,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -29,7 +30,9 @@ Array [
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"postsCount": 3,
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(4)",
|
||||
@ -40,6 +43,7 @@ Array [
|
||||
"postsCount": 2,
|
||||
"viewer": Object {
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -51,6 +55,7 @@ Array [
|
||||
"postsCount": 2,
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
@ -71,6 +76,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
||||
@ -85,6 +91,7 @@ Object {
|
||||
"postsCount": 2,
|
||||
"viewer": Object {
|
||||
"followedBy": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
||||
@ -101,7 +108,9 @@ Object {
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"postsCount": 4,
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
@ -118,6 +127,8 @@ Object {
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"postsCount": 4,
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
@ -6,7 +6,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "eve.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(1)",
|
||||
@ -14,6 +16,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -23,6 +26,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
@ -36,6 +40,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
@ -47,7 +52,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "eve.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(1)",
|
||||
@ -55,6 +62,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
|
@ -18,6 +18,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -46,7 +47,9 @@ Object {
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embed": Object {
|
||||
@ -128,6 +131,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -174,6 +178,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -203,6 +208,7 @@ Object {
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -241,7 +247,9 @@ Object {
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embed": Object {
|
||||
@ -324,6 +332,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
@ -374,6 +383,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -403,6 +413,7 @@ Object {
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -440,7 +451,9 @@ Object {
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embed": Object {
|
||||
@ -528,6 +541,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -555,7 +569,9 @@ Object {
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -595,6 +611,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -643,6 +660,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -682,6 +700,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -731,6 +750,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -782,6 +802,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -828,6 +849,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -857,7 +879,9 @@ Object {
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"embed": Object {
|
||||
@ -940,6 +964,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -990,6 +1015,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -1019,7 +1045,9 @@ Object {
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"embed": Object {
|
||||
|
@ -11,7 +11,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -35,6 +37,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -49,7 +52,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -85,7 +90,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
"embed": Object {
|
||||
@ -98,6 +105,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
@ -180,7 +188,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -206,6 +216,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
@ -260,6 +271,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -286,7 +298,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -317,7 +331,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -341,6 +357,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -355,7 +372,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -392,6 +411,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -427,7 +447,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -451,7 +473,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -478,7 +502,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
"embed": Object {
|
||||
@ -530,6 +556,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(11)",
|
||||
"following": "record(10)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -556,7 +583,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -582,6 +611,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -609,6 +639,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(6)",
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
@ -641,6 +672,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(11)",
|
||||
"following": "record(10)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(12)",
|
||||
@ -738,6 +770,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(11)",
|
||||
"following": "record(10)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(12)",
|
||||
@ -773,7 +806,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(13)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -804,7 +839,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -828,6 +865,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -842,6 +880,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -856,6 +895,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -889,6 +929,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -1011,6 +1052,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1025,7 +1067,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1063,6 +1107,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -1140,7 +1185,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1168,6 +1215,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
@ -1203,7 +1251,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1227,7 +1277,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1257,6 +1309,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -1335,7 +1388,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1359,7 +1414,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1386,7 +1443,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(10)",
|
||||
"embed": Object {
|
||||
@ -1399,6 +1458,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -1414,6 +1474,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -1546,6 +1607,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(11)",
|
||||
@ -1572,7 +1634,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1598,6 +1662,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -1612,6 +1677,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -1645,6 +1711,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -1768,6 +1835,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(12)",
|
||||
@ -1795,6 +1863,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -1827,6 +1896,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -1924,6 +1994,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -1959,7 +2030,9 @@ Array [
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(13)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -1990,6 +2063,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -2003,6 +2077,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(1)",
|
||||
@ -2033,7 +2108,9 @@ Array [
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -2154,6 +2231,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -2171,6 +2249,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -2206,7 +2285,9 @@ Array [
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
"embed": Object {
|
||||
@ -2286,6 +2367,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -2315,6 +2397,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
@ -2353,6 +2436,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -2382,6 +2466,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -2411,7 +2496,9 @@ Array [
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
"embed": Object {
|
||||
@ -2492,6 +2579,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -2521,6 +2609,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -2553,6 +2642,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(10)",
|
||||
@ -2566,6 +2656,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -2580,6 +2671,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(1)",
|
||||
@ -2711,7 +2803,9 @@ Array [
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(11)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -2740,6 +2834,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -2768,6 +2863,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(1)",
|
||||
@ -2797,7 +2893,9 @@ Array [
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
"embeds": Array [],
|
||||
@ -2891,7 +2989,9 @@ Array [
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -2929,6 +3029,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(12)",
|
||||
@ -2958,7 +3059,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"embed": Object {
|
||||
@ -2969,7 +3072,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(1)",
|
||||
"embeds": Array [
|
||||
@ -3001,6 +3106,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -3122,7 +3228,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
},
|
||||
@ -3139,6 +3247,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -3176,6 +3285,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -3256,6 +3366,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -3283,7 +3394,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -3321,6 +3434,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -3350,6 +3464,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -3382,6 +3497,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(10)",
|
||||
@ -3393,7 +3509,9 @@ Array [
|
||||
"did": "user(0)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"embeds": Array [
|
||||
@ -3405,7 +3523,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(1)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -3539,6 +3659,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
@ -3565,7 +3686,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(1)",
|
||||
"embed": Object {
|
||||
@ -3596,6 +3719,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -3691,6 +3815,7 @@ Array [
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(11)",
|
||||
@ -3724,6 +3849,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -3749,7 +3875,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
},
|
||||
@ -3765,6 +3893,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
@ -3845,6 +3974,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -3874,6 +4004,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
@ -3906,6 +4037,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
@ -3930,7 +4062,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
"embed": Object {
|
||||
@ -3941,7 +4075,9 @@ Array [
|
||||
"did": "user(5)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
"embeds": Array [
|
||||
@ -3973,6 +4109,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -4094,7 +4231,9 @@ Array [
|
||||
"did": "user(2)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -4122,6 +4261,7 @@ Array [
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
|
@ -4,7 +4,7 @@ import { forSnapshot } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
|
||||
describe('pds views with mutes from mute lists', () => {
|
||||
describe('bsky views with mutes from mute lists', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let pdsAgent: AtpAgent
|
||||
@ -79,6 +79,7 @@ describe('pds views with mutes from mute lists', () => {
|
||||
sc.getHeaders(alice),
|
||||
)
|
||||
await network.processAll()
|
||||
await network.bsky.ctx.backgroundQueue.processAll()
|
||||
})
|
||||
|
||||
it('uses a list for mutes', async () => {
|
||||
@ -94,113 +95,93 @@ describe('pds views with mutes from mute lists', () => {
|
||||
)
|
||||
})
|
||||
|
||||
// it('flags mutes in threads', async () => {
|
||||
// const res = await agent.api.app.bsky.feed.getPostThread(
|
||||
// { depth: 1, uri: sc.posts[alice][1].ref.uriStr },
|
||||
// { headers: sc.getHeaders(dan) },
|
||||
// )
|
||||
// expect(forSnapshot(res.data.thread)).toMatchSnapshot()
|
||||
// })
|
||||
it('flags mutes in threads', async () => {
|
||||
const res = await agent.api.app.bsky.feed.getPostThread(
|
||||
{ depth: 1, uri: sc.posts[alice][1].ref.uriStr },
|
||||
{ headers: await network.serviceHeaders(dan) },
|
||||
)
|
||||
expect(forSnapshot(res.data.thread)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
// it('does not show reposted content from a muted account in author feed', async () => {
|
||||
// await sc.repost(alice, sc.posts[carol][0].ref)
|
||||
it('does not show reposted content from a muted account in author feed', async () => {
|
||||
await sc.repost(alice, sc.posts[carol][0].ref)
|
||||
await network.processAll()
|
||||
|
||||
// const res = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
// { actor: alice },
|
||||
// { headers: sc.getHeaders(dan) },
|
||||
// )
|
||||
// expect(
|
||||
// res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
|
||||
// ).toBe(false)
|
||||
// })
|
||||
const res = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{ actor: alice },
|
||||
{ headers: await network.serviceHeaders(dan) },
|
||||
)
|
||||
expect(
|
||||
res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
|
||||
).toBe(false)
|
||||
})
|
||||
|
||||
// it('removes content from muted users on getTimeline', async () => {
|
||||
// const res = await agent.api.app.bsky.feed.getTimeline(
|
||||
// { limit: 100 },
|
||||
// { headers: sc.getHeaders(dan) },
|
||||
// )
|
||||
// expect(
|
||||
// res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
|
||||
// ).toBe(false)
|
||||
// })
|
||||
it('removes content from muted users on getTimeline', async () => {
|
||||
const res = await agent.api.app.bsky.feed.getTimeline(
|
||||
{ limit: 100 },
|
||||
{ headers: await network.serviceHeaders(dan) },
|
||||
)
|
||||
expect(
|
||||
res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
|
||||
).toBe(false)
|
||||
})
|
||||
|
||||
// it('flags muted users on getPopular', async () => {
|
||||
// for (let i = 0; i < 15; i++) {
|
||||
// const name = `user${i}`
|
||||
// await sc.createAccount(name, {
|
||||
// handle: `user${i}.test`,
|
||||
// email: `user${i}@test.com`,
|
||||
// password: 'password',
|
||||
// })
|
||||
// await sc.like(sc.dids[name], sc.posts[alice][0].ref)
|
||||
// await sc.like(sc.dids[name], sc.posts[bob][0].ref)
|
||||
// await sc.like(sc.dids[name], sc.posts[carol][0].ref)
|
||||
// await sc.like(sc.dids[name], sc.posts[dan][0].ref)
|
||||
// }
|
||||
it('returns mute status on getProfile', async () => {
|
||||
const res = await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: carol },
|
||||
{ headers: await network.serviceHeaders(dan) },
|
||||
)
|
||||
expect(res.data.viewer?.muted).toBe(true)
|
||||
expect(res.data.viewer?.mutedByList?.uri).toBe(listUri)
|
||||
})
|
||||
|
||||
// const res = await agent.api.app.bsky.unspecced.getPopular(
|
||||
// {},
|
||||
// { headers: sc.getHeaders(dan) },
|
||||
// )
|
||||
// expect(
|
||||
// res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
|
||||
// ).toBe(false)
|
||||
// })
|
||||
it('returns mute status on getProfiles', async () => {
|
||||
const res = await agent.api.app.bsky.actor.getProfiles(
|
||||
{ actors: [alice, carol] },
|
||||
{ headers: await network.serviceHeaders(dan) },
|
||||
)
|
||||
expect(res.data.profiles[0].viewer?.muted).toBe(false)
|
||||
expect(res.data.profiles[0].viewer?.mutedByList).toBeUndefined()
|
||||
expect(res.data.profiles[1].viewer?.muted).toBe(true)
|
||||
expect(res.data.profiles[1].viewer?.mutedByList?.uri).toEqual(listUri)
|
||||
})
|
||||
|
||||
// it('returns mute status on getProfile', async () => {
|
||||
// const res = await agent.api.app.bsky.actor.getProfile(
|
||||
// { actor: carol },
|
||||
// { headers: sc.getHeaders(dan) },
|
||||
// )
|
||||
// expect(res.data.viewer?.muted).toBe(true)
|
||||
// expect(res.data.viewer?.mutedByList?.uri).toBe(listUri)
|
||||
// })
|
||||
it('does not return notifs for muted accounts', async () => {
|
||||
const res = await agent.api.app.bsky.notification.listNotifications(
|
||||
{
|
||||
limit: 100,
|
||||
},
|
||||
{ headers: await network.serviceHeaders(dan) },
|
||||
)
|
||||
expect(
|
||||
res.data.notifications.some((notif) =>
|
||||
[bob, carol].includes(notif.author.did),
|
||||
),
|
||||
).toBeFalsy()
|
||||
})
|
||||
|
||||
// it('returns mute status on getProfiles', async () => {
|
||||
// const res = await agent.api.app.bsky.actor.getProfiles(
|
||||
// { actors: [alice, carol] },
|
||||
// { headers: sc.getHeaders(dan) },
|
||||
// )
|
||||
// expect(res.data.profiles[0].viewer?.muted).toBe(false)
|
||||
// expect(res.data.profiles[0].viewer?.mutedByList).toBeUndefined()
|
||||
// expect(res.data.profiles[1].viewer?.muted).toBe(true)
|
||||
// expect(res.data.profiles[1].viewer?.mutedByList?.uri).toEqual(listUri)
|
||||
// })
|
||||
it('flags muted accounts in get suggestions', async () => {
|
||||
// unfollow so they _would_ show up in suggestions if not for mute
|
||||
await sc.unfollow(dan, carol)
|
||||
await network.processAll()
|
||||
await network.bsky.ctx.backgroundQueue.processAll()
|
||||
|
||||
// it('does not return notifs for muted accounts', async () => {
|
||||
// const res = await agent.api.app.bsky.notification.listNotifications(
|
||||
// {
|
||||
// limit: 100,
|
||||
// },
|
||||
// { headers: sc.getHeaders(dan) },
|
||||
// )
|
||||
// expect(
|
||||
// res.data.notifications.some((notif) =>
|
||||
// [bob, carol].includes(notif.author.did),
|
||||
// ),
|
||||
// ).toBeFalsy()
|
||||
// })
|
||||
|
||||
// it('flags muted accounts in in get suggestions', async () => {
|
||||
// // unfollow so they _would_ show up in suggestions if not for mute
|
||||
// await sc.unfollow(dan, carol)
|
||||
|
||||
// const res = await agent.api.app.bsky.actor.getSuggestions(
|
||||
// {
|
||||
// limit: 100,
|
||||
// },
|
||||
// { headers: sc.getHeaders(dan) },
|
||||
// )
|
||||
// for (const actor of res.data.actors) {
|
||||
// if ([bob, carol].includes(actor.did)) {
|
||||
// expect(actor.viewer?.muted).toBe(true)
|
||||
// expect(actor.viewer?.mutedByList?.uri).toEqual(listUri)
|
||||
// } else {
|
||||
// expect(actor.viewer?.muted).toBe(false)
|
||||
// expect(actor.viewer?.mutedByList).toBeUndefined()
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
const res = await agent.api.app.bsky.actor.getSuggestions(
|
||||
{
|
||||
limit: 100,
|
||||
},
|
||||
{ headers: await network.serviceHeaders(dan) },
|
||||
)
|
||||
for (const actor of res.data.actors) {
|
||||
if ([bob, carol].includes(actor.did)) {
|
||||
expect(actor.viewer?.muted).toBe(true)
|
||||
expect(actor.viewer?.mutedByList?.uri).toEqual(listUri)
|
||||
} else {
|
||||
expect(actor.viewer?.muted).toBe(false)
|
||||
expect(actor.viewer?.mutedByList).toBeUndefined()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
it('returns the contents of a list', async () => {
|
||||
const res = await agent.api.app.bsky.graph.getList(
|
||||
|
219
packages/bsky/tests/views/mutes.test.ts
Normal file
219
packages/bsky/tests/views/mutes.test.ts
Normal file
@ -0,0 +1,219 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { forSnapshot, paginateAll } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
import usersBulkSeed from '../seeds/users-bulk'
|
||||
|
||||
describe('mute views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let pdsAgent: AtpAgent
|
||||
let sc: SeedClient
|
||||
let alice: string
|
||||
let bob: string
|
||||
let carol: string
|
||||
let dan: string
|
||||
|
||||
let mutes: string[]
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'bsky_views_mutes',
|
||||
})
|
||||
agent = network.bsky.getClient()
|
||||
pdsAgent = network.pds.getClient()
|
||||
sc = new SeedClient(pdsAgent)
|
||||
await basicSeed(sc)
|
||||
await usersBulkSeed(sc, 10)
|
||||
alice = sc.dids.alice
|
||||
bob = sc.dids.bob
|
||||
carol = sc.dids.carol
|
||||
dan = sc.dids.dan
|
||||
mutes = [
|
||||
bob,
|
||||
carol,
|
||||
'aliya-hodkiewicz.test',
|
||||
'adrienne49.test',
|
||||
'jeffrey-sawayn87.test',
|
||||
'nicolas-krajcik10.test',
|
||||
'magnus53.test',
|
||||
'elta48.test',
|
||||
]
|
||||
await network.processAll()
|
||||
for (const did of mutes) {
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: did },
|
||||
{
|
||||
headers: await network.serviceHeaders(alice),
|
||||
encoding: 'application/json',
|
||||
},
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('flags mutes in threads', async () => {
|
||||
const res = await agent.api.app.bsky.feed.getPostThread(
|
||||
{ depth: 1, uri: sc.posts[alice][1].ref.uriStr },
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
expect(forSnapshot(res.data.thread)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('does not show reposted content from a muted account in author feed', async () => {
|
||||
await sc.repost(dan, sc.posts[bob][0].ref)
|
||||
await sc.repost(dan, sc.posts[bob][1].ref)
|
||||
await network.processAll()
|
||||
|
||||
const res = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{ actor: dan },
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
expect(
|
||||
res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
|
||||
).toBe(false)
|
||||
})
|
||||
|
||||
it('removes content from muted users on getTimeline', async () => {
|
||||
const res = await agent.api.app.bsky.feed.getTimeline(
|
||||
{ limit: 100 },
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
expect(
|
||||
res.data.feed.some((post) => [bob, carol].includes(post.post.author.did)),
|
||||
).toBe(false)
|
||||
})
|
||||
|
||||
it('returns mute status on getProfile', async () => {
|
||||
const res = await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: bob },
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
expect(res.data.viewer?.muted).toBe(true)
|
||||
})
|
||||
|
||||
it('returns mute status on getProfiles', async () => {
|
||||
const res = await agent.api.app.bsky.actor.getProfiles(
|
||||
{ actors: [bob, carol, dan] },
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
expect(res.data.profiles[0].viewer?.muted).toBe(true)
|
||||
expect(res.data.profiles[1].viewer?.muted).toBe(true)
|
||||
expect(res.data.profiles[2].viewer?.muted).toBe(false)
|
||||
})
|
||||
|
||||
it('does not return notifs for muted accounts', async () => {
|
||||
const res = await agent.api.app.bsky.notification.listNotifications(
|
||||
{
|
||||
limit: 100,
|
||||
},
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
expect(
|
||||
res.data.notifications.some((notif) =>
|
||||
[bob, carol].includes(notif.author.did),
|
||||
),
|
||||
).toBeFalsy()
|
||||
})
|
||||
|
||||
it('flags muted accounts in get suggestions', async () => {
|
||||
// unfollow so they _would_ show up in suggestions if not for mute
|
||||
await sc.unfollow(alice, bob)
|
||||
await sc.unfollow(alice, carol)
|
||||
|
||||
await network.processAll()
|
||||
|
||||
const res = await agent.api.app.bsky.actor.getSuggestions(
|
||||
{
|
||||
limit: 100,
|
||||
},
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
for (const actor of res.data.actors) {
|
||||
if (mutes.includes(actor.did) || mutes.includes(actor.handle)) {
|
||||
expect(actor.viewer?.muted).toBe(true)
|
||||
} else {
|
||||
expect(actor.viewer?.muted).toBe(false)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
it('fetches mutes for the logged-in user.', async () => {
|
||||
const { data: view } = await agent.api.app.bsky.graph.getMutes(
|
||||
{},
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
expect(forSnapshot(view.mutes)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('paginates.', async () => {
|
||||
const results = (results) => results.flatMap((res) => res.mutes)
|
||||
const paginator = async (cursor?: string) => {
|
||||
const { data: view } = await agent.api.app.bsky.graph.getMutes(
|
||||
{ cursor, limit: 2 },
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
return view
|
||||
}
|
||||
|
||||
const paginatedAll = await paginateAll(paginator)
|
||||
paginatedAll.forEach((res) =>
|
||||
expect(res.mutes.length).toBeLessThanOrEqual(2),
|
||||
)
|
||||
|
||||
const full = await agent.api.app.bsky.graph.getMutes(
|
||||
{},
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(full.data.mutes.length).toEqual(8)
|
||||
expect(results(paginatedAll)).toEqual(results([full.data]))
|
||||
})
|
||||
|
||||
it('removes mute.', async () => {
|
||||
const { data: initial } = await agent.api.app.bsky.graph.getMutes(
|
||||
{},
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
expect(initial.mutes.length).toEqual(8)
|
||||
expect(initial.mutes.map((m) => m.handle)).toContain('elta48.test')
|
||||
|
||||
await agent.api.app.bsky.graph.unmuteActor(
|
||||
{ actor: sc.dids['elta48.test'] },
|
||||
{
|
||||
headers: await network.serviceHeaders(alice),
|
||||
encoding: 'application/json',
|
||||
},
|
||||
)
|
||||
|
||||
const { data: final } = await agent.api.app.bsky.graph.getMutes(
|
||||
{},
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
expect(final.mutes.length).toEqual(7)
|
||||
expect(final.mutes.map((m) => m.handle)).not.toContain('elta48.test')
|
||||
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: sc.dids['elta48.test'] },
|
||||
{
|
||||
headers: await network.serviceHeaders(alice),
|
||||
encoding: 'application/json',
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
it('does not allow muting self.', async () => {
|
||||
const promise = agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: alice },
|
||||
{
|
||||
headers: await network.serviceHeaders(alice),
|
||||
encoding: 'application/json',
|
||||
},
|
||||
)
|
||||
await expect(promise).rejects.toThrow('Cannot mute oneself')
|
||||
})
|
||||
})
|
@ -1,91 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
|
||||
describe('popular views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
let bob: string
|
||||
let carol: string
|
||||
let dan: string
|
||||
let eve: string
|
||||
let frank: string
|
||||
|
||||
const account = {
|
||||
email: 'blah@test.com',
|
||||
password: 'blh-pass',
|
||||
}
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'bsky_views_popular',
|
||||
})
|
||||
agent = network.bsky.getClient()
|
||||
const pdsAgent = network.pds.getClient()
|
||||
sc = new SeedClient(pdsAgent)
|
||||
await basicSeed(sc)
|
||||
await sc.createAccount('eve', {
|
||||
...account,
|
||||
email: 'eve@test.com',
|
||||
handle: 'eve.test',
|
||||
password: 'eve-pass',
|
||||
})
|
||||
await sc.createAccount('frank', {
|
||||
...account,
|
||||
email: 'frank@test.com',
|
||||
handle: 'frank.test',
|
||||
password: 'frank-pass',
|
||||
})
|
||||
await network.processAll()
|
||||
alice = sc.dids.alice
|
||||
bob = sc.dids.bob
|
||||
carol = sc.dids.carol
|
||||
dan = sc.dids.dan
|
||||
eve = sc.dids.eve
|
||||
frank = sc.dids.frank
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('returns well liked posts', async () => {
|
||||
const img = await sc.uploadFile(
|
||||
alice,
|
||||
'tests/image/fixtures/key-landscape-small.jpg',
|
||||
'image/jpeg',
|
||||
)
|
||||
const one = await sc.post(alice, 'first post', undefined, [img])
|
||||
await sc.like(bob, one.ref)
|
||||
await sc.like(carol, one.ref)
|
||||
await sc.like(dan, one.ref)
|
||||
await sc.like(eve, one.ref)
|
||||
await sc.like(frank, one.ref)
|
||||
const two = await sc.post(bob, 'bobby boi')
|
||||
await sc.like(alice, two.ref)
|
||||
await sc.like(carol, two.ref)
|
||||
await sc.like(dan, two.ref)
|
||||
await sc.like(eve, two.ref)
|
||||
await sc.like(frank, two.ref)
|
||||
const three = await sc.reply(bob, one.ref, one.ref, 'reply')
|
||||
await sc.like(alice, three.ref)
|
||||
await sc.like(carol, three.ref)
|
||||
await sc.like(dan, three.ref)
|
||||
await sc.like(eve, three.ref)
|
||||
await sc.like(frank, three.ref)
|
||||
await network.processAll()
|
||||
|
||||
const res = await agent.api.app.bsky.unspecced.getPopular(
|
||||
{},
|
||||
{ headers: await network.serviceHeaders(alice) },
|
||||
)
|
||||
const feedUris = res.data.feed.map((i) => i.post.uri).sort()
|
||||
const expected = [one.ref.uriStr, two.ref.uriStr, three.ref.uriStr].sort()
|
||||
expect(feedUris).toEqual(expected)
|
||||
})
|
||||
})
|
@ -1,141 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pds user search proxy views search gives relevant results 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"did": "user(0)",
|
||||
"handle": "cara-wiegand69.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(2)/cids(0)@jpeg",
|
||||
"did": "user(1)",
|
||||
"displayName": "Carol Littel",
|
||||
"handle": "eudora-dietrich4.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(0)@jpeg",
|
||||
"did": "user(3)",
|
||||
"displayName": "Sadie Carter",
|
||||
"handle": "shane-torphy52.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(6)/cids(0)@jpeg",
|
||||
"did": "user(5)",
|
||||
"displayName": "Carlton Abernathy IV",
|
||||
"handle": "aliya-hodkiewicz.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(7)",
|
||||
"handle": "carlos6.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(9)/cids(0)@jpeg",
|
||||
"did": "user(8)",
|
||||
"displayName": "Latoya Windler",
|
||||
"handle": "carolina-mcdermott77.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(11)/cids(0)@jpeg",
|
||||
"did": "user(10)",
|
||||
"displayName": "Rachel Kshlerin",
|
||||
"handle": "cayla-marquardt39.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`pds user search proxy views typeahead gives relevant results 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"did": "user(0)",
|
||||
"handle": "cara-wiegand69.test",
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(2)/cids(0)@jpeg",
|
||||
"did": "user(1)",
|
||||
"displayName": "Carol Littel",
|
||||
"handle": "eudora-dietrich4.test",
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(0)@jpeg",
|
||||
"did": "user(3)",
|
||||
"displayName": "Sadie Carter",
|
||||
"handle": "shane-torphy52.test",
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(6)/cids(0)@jpeg",
|
||||
"did": "user(5)",
|
||||
"displayName": "Carlton Abernathy IV",
|
||||
"handle": "aliya-hodkiewicz.test",
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(7)",
|
||||
"handle": "carlos6.test",
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(9)/cids(0)@jpeg",
|
||||
"did": "user(8)",
|
||||
"displayName": "Latoya Windler",
|
||||
"handle": "carolina-mcdermott77.test",
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(11)/cids(0)@jpeg",
|
||||
"did": "user(10)",
|
||||
"displayName": "Rachel Kshlerin",
|
||||
"handle": "cayla-marquardt39.test",
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -60,6 +62,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -137,7 +140,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -165,6 +170,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
@ -200,7 +206,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -224,7 +232,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -263,6 +273,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
@ -341,7 +352,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -365,7 +378,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -392,7 +407,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(7)",
|
||||
"embed": Object {
|
||||
@ -405,6 +422,7 @@ Object {
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(11)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
@ -420,6 +438,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
@ -552,6 +571,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(12)",
|
||||
@ -578,7 +598,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
@ -605,6 +627,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
@ -646,6 +669,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(11)",
|
||||
@ -734,6 +758,7 @@ Object {
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(11)",
|
||||
@ -760,7 +785,9 @@ Object {
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {},
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(13)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
|
@ -1,537 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pds follow proxy views fetches followers 1`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"followers": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-eve",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-eve",
|
||||
"handle": "eve.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(5)/cids(0)@jpeg",
|
||||
"description": "descript-dan",
|
||||
"did": "user(4)",
|
||||
"displayName": "display-dan",
|
||||
"handle": "dan.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(7)/cids(0)@jpeg",
|
||||
"description": "descript-bob",
|
||||
"did": "user(6)",
|
||||
"displayName": "display-bob",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(9)/cids(0)@jpeg",
|
||||
"description": "descript-carol",
|
||||
"did": "user(8)",
|
||||
"displayName": "display-carol",
|
||||
"handle": "carol.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds follow proxy views fetches followers 2`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"followers": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-dan",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-dan",
|
||||
"handle": "dan.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(5)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(4)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-bob",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-bob",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds follow proxy views fetches followers 3`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"followers": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-eve",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-eve",
|
||||
"handle": "eve.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(5)/cids(0)@jpeg",
|
||||
"description": "descript-bob",
|
||||
"did": "user(4)",
|
||||
"displayName": "display-bob",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(7)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(6)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-carol",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-carol",
|
||||
"handle": "carol.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds follow proxy views fetches followers 4`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"followers": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-dan",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-dan",
|
||||
"handle": "dan.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds follow proxy views fetches followers 5`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"followers": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-dan",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-dan",
|
||||
"handle": "dan.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(5)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(4)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-eve",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-eve",
|
||||
"handle": "eve.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds follow proxy views fetches follows 1`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"follows": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-eve",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-eve",
|
||||
"handle": "eve.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(5)/cids(0)@jpeg",
|
||||
"description": "descript-dan",
|
||||
"did": "user(4)",
|
||||
"displayName": "display-dan",
|
||||
"handle": "dan.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(7)/cids(0)@jpeg",
|
||||
"description": "descript-carol",
|
||||
"did": "user(6)",
|
||||
"displayName": "display-carol",
|
||||
"handle": "carol.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(9)/cids(0)@jpeg",
|
||||
"description": "descript-bob",
|
||||
"did": "user(8)",
|
||||
"displayName": "display-bob",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(7)",
|
||||
"following": "record(6)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds follow proxy views fetches follows 2`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"follows": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-carol",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-carol",
|
||||
"handle": "carol.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(5)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(4)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-bob",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-bob",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds follow proxy views fetches follows 3`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"follows": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-carol",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-carol",
|
||||
"handle": "carol.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds follow proxy views fetches follows 4`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"follows": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-eve",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-eve",
|
||||
"handle": "eve.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(5)/cids(0)@jpeg",
|
||||
"description": "descript-bob",
|
||||
"did": "user(4)",
|
||||
"displayName": "display-bob",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(7)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(6)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-dan",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-dan",
|
||||
"handle": "dan.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds follow proxy views fetches follows 5`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"follows": Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "descript-carol",
|
||||
"did": "user(2)",
|
||||
"displayName": "display-carol",
|
||||
"handle": "carol.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(5)/cids(0)@jpeg",
|
||||
"description": "descript-alice",
|
||||
"did": "user(4)",
|
||||
"displayName": "display-alice",
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"subject": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "descript-eve",
|
||||
"did": "user(0)",
|
||||
"displayName": "display-eve",
|
||||
"handle": "eve.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
@ -1,99 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pds like proxy views fetches post likes 1`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"likes": Array [
|
||||
Object {
|
||||
"actor": Object {
|
||||
"did": "user(0)",
|
||||
"handle": "eve.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
},
|
||||
Object {
|
||||
"actor": Object {
|
||||
"did": "user(1)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
},
|
||||
Object {
|
||||
"actor": Object {
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(3)",
|
||||
"following": "record(2)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
},
|
||||
Object {
|
||||
"actor": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(0)@jpeg",
|
||||
"description": "hi im bob label_me",
|
||||
"did": "user(3)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(1)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(6)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(5)",
|
||||
"following": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
},
|
||||
],
|
||||
"uri": "record(0)",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds like proxy views fetches reply likes 1`] = `
|
||||
Object {
|
||||
"cursor": "0000000000000::bafycid",
|
||||
"likes": Array [
|
||||
Object {
|
||||
"actor": Object {
|
||||
"did": "user(0)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
},
|
||||
],
|
||||
"uri": "record(0)",
|
||||
}
|
||||
`;
|
File diff suppressed because it is too large
Load Diff
@ -1,408 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pds posts views fetches posts 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"text": "hey there",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 3,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000000Z",
|
||||
"text": "again",
|
||||
},
|
||||
"replyCount": 2,
|
||||
"repostCount": 1,
|
||||
"uri": "record(1)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(1)@jpeg",
|
||||
"did": "user(2)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(4)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(5)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"text": "bob back at it again!",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(2)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"did": "user(4)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.recordWithMedia#view",
|
||||
"media": Object {
|
||||
"$type": "app.bsky.embed.images#view",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(5)/cids(6)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(5)/cids(6)@jpeg",
|
||||
},
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-alt.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(5)/cids(7)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(5)/cids(7)@jpeg",
|
||||
},
|
||||
],
|
||||
},
|
||||
"record": Object {
|
||||
"record": Object {
|
||||
"$type": "app.bsky.embed.record#viewRecord",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(1)@jpeg",
|
||||
"did": "user(2)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(4)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(5)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embeds": Array [],
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"uri": "record(2)",
|
||||
"value": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"text": "bob back at it again!",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 2,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.recordWithMedia",
|
||||
"media": Object {
|
||||
"$type": "app.bsky.embed.images",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(6)",
|
||||
},
|
||||
"size": 4114,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-alt.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(7)",
|
||||
},
|
||||
"size": 12736,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
"record": Object {
|
||||
"record": Object {
|
||||
"cid": "cids(3)",
|
||||
"uri": "record(2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"text": "hi im carol",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(6)",
|
||||
"viewer": Object {
|
||||
"like": "record(9)",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"did": "user(6)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(11)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(8)",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.record#view",
|
||||
"record": Object {
|
||||
"$type": "app.bsky.embed.record#viewRecord",
|
||||
"author": Object {
|
||||
"did": "user(4)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(8)",
|
||||
"following": "record(7)",
|
||||
},
|
||||
},
|
||||
"cid": "cids(5)",
|
||||
"embeds": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.embed.recordWithMedia#view",
|
||||
"media": Object {
|
||||
"$type": "app.bsky.embed.images#view",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(5)/cids(6)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(5)/cids(6)@jpeg",
|
||||
},
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-alt.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(5)/cids(7)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(5)/cids(7)@jpeg",
|
||||
},
|
||||
],
|
||||
},
|
||||
"record": Object {
|
||||
"record": Object {
|
||||
"$type": "app.bsky.embed.record#viewRecord",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(1)@jpeg",
|
||||
"did": "user(2)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(4)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(5)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"uri": "record(2)",
|
||||
"value": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"text": "bob back at it again!",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"uri": "record(6)",
|
||||
"value": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.recordWithMedia",
|
||||
"media": Object {
|
||||
"$type": "app.bsky.embed.images",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(6)",
|
||||
},
|
||||
"size": 4114,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-alt.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(7)",
|
||||
},
|
||||
"size": 12736,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
"record": Object {
|
||||
"record": Object {
|
||||
"cid": "cids(3)",
|
||||
"uri": "record(2)",
|
||||
},
|
||||
},
|
||||
},
|
||||
"text": "hi im carol",
|
||||
},
|
||||
},
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.record",
|
||||
"record": Object {
|
||||
"cid": "cids(5)",
|
||||
"uri": "record(6)",
|
||||
},
|
||||
},
|
||||
"facets": Array [
|
||||
Object {
|
||||
"features": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.richtext.facet#mention",
|
||||
"did": "user(0)",
|
||||
},
|
||||
],
|
||||
"index": Object {
|
||||
"byteEnd": 18,
|
||||
"byteStart": 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
"text": "@alice.bluesky.xyz is the best",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 1,
|
||||
"uri": "record(10)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(9)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(10)",
|
||||
"uri": "record(13)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(2)",
|
||||
"uri": "record(1)",
|
||||
},
|
||||
},
|
||||
"text": "thanks bob",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(12)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
]
|
||||
`;
|
@ -1,124 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pds profile proxy views fetches multiple profiles 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "its me!",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"followersCount": 2,
|
||||
"followsCount": 3,
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"postsCount": 4,
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(0)@jpeg",
|
||||
"description": "hi im bob label_me",
|
||||
"did": "user(2)",
|
||||
"displayName": "bobby",
|
||||
"followersCount": 2,
|
||||
"followsCount": 2,
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(1)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(2)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"postsCount": 3,
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(4)",
|
||||
"followersCount": 2,
|
||||
"followsCount": 1,
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"postsCount": 2,
|
||||
"viewer": Object {
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(5)",
|
||||
"followersCount": 1,
|
||||
"followsCount": 1,
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"postsCount": 2,
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`pds profile proxy views fetches other's profile, with a follow 1`] = `
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "its me!",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"followersCount": 2,
|
||||
"followsCount": 3,
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"postsCount": 4,
|
||||
"viewer": Object {
|
||||
"followedBy": "record(1)",
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds profile proxy views fetches other's profile, without a follow 1`] = `
|
||||
Object {
|
||||
"did": "user(0)",
|
||||
"followersCount": 1,
|
||||
"followsCount": 1,
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"postsCount": 2,
|
||||
"viewer": Object {
|
||||
"followedBy": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds profile proxy views fetches own profile 1`] = `
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(0)@jpeg",
|
||||
"description": "its me!",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"followersCount": 2,
|
||||
"followsCount": 3,
|
||||
"handle": "alice.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"postsCount": 4,
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
}
|
||||
`;
|
@ -1,78 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pds repost proxy views fetches reposted-by for a post 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"did": "user(0)",
|
||||
"handle": "eve.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(1)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(0)@jpeg",
|
||||
"description": "hi im bob label_me",
|
||||
"did": "user(3)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(1)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(5)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(4)",
|
||||
"following": "record(3)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`pds repost proxy views fetches reposted-by for a reply 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"did": "user(0)",
|
||||
"handle": "eve.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"did": "user(1)",
|
||||
"handle": "dan.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(0)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
@ -1,982 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pds thread proxy views fetches ancestors 1`] = `
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"parent": Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"parent": Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 3,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000000Z",
|
||||
"text": "again",
|
||||
},
|
||||
"replyCount": 2,
|
||||
"repostCount": 1,
|
||||
"uri": "record(3)",
|
||||
"viewer": Object {
|
||||
"like": "record(7)",
|
||||
},
|
||||
},
|
||||
"replies": Array [],
|
||||
},
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(1)@jpeg",
|
||||
"did": "user(2)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(4)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(6)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images#view",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(3)/cids(5)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(3)/cids(5)@jpeg",
|
||||
},
|
||||
],
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(4)",
|
||||
"val": "test-label",
|
||||
},
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(4)",
|
||||
"val": "test-label-2",
|
||||
},
|
||||
],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(5)",
|
||||
},
|
||||
"size": 4114,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(2)",
|
||||
"uri": "record(3)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(2)",
|
||||
"uri": "record(3)",
|
||||
},
|
||||
},
|
||||
"text": "hear that label_me label_me_2",
|
||||
},
|
||||
"replyCount": 1,
|
||||
"repostCount": 0,
|
||||
"uri": "record(4)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [],
|
||||
},
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(3)",
|
||||
"uri": "record(4)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(2)",
|
||||
"uri": "record(3)",
|
||||
},
|
||||
},
|
||||
"text": "thanks bob",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 1,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {
|
||||
"repost": "record(5)",
|
||||
},
|
||||
},
|
||||
"replies": Array [],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds thread proxy views fetches deep post thread 1`] = `
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 3,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000000Z",
|
||||
"text": "again",
|
||||
},
|
||||
"replyCount": 2,
|
||||
"repostCount": 1,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {
|
||||
"like": "record(3)",
|
||||
},
|
||||
},
|
||||
"replies": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "of course",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(4)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [],
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(1)@jpeg",
|
||||
"did": "user(3)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(4)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(7)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images#view",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(4)/cids(5)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(4)/cids(5)@jpeg",
|
||||
},
|
||||
],
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(6)",
|
||||
"val": "test-label",
|
||||
},
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(6)",
|
||||
"val": "test-label-2",
|
||||
},
|
||||
],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(5)",
|
||||
},
|
||||
"size": 4114,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "hear that label_me label_me_2",
|
||||
},
|
||||
"replyCount": 1,
|
||||
"repostCount": 0,
|
||||
"uri": "record(6)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(3)",
|
||||
"uri": "record(6)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "thanks bob",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 1,
|
||||
"uri": "record(8)",
|
||||
"viewer": Object {
|
||||
"repost": "record(9)",
|
||||
},
|
||||
},
|
||||
"replies": Array [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds thread proxy views fetches shallow post thread 1`] = `
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 3,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000000Z",
|
||||
"text": "again",
|
||||
},
|
||||
"replyCount": 2,
|
||||
"repostCount": 1,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {
|
||||
"like": "record(3)",
|
||||
},
|
||||
},
|
||||
"replies": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "of course",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(4)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(1)@jpeg",
|
||||
"did": "user(3)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(4)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(7)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images#view",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(4)/cids(5)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(4)/cids(5)@jpeg",
|
||||
},
|
||||
],
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(6)",
|
||||
"val": "test-label",
|
||||
},
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(6)",
|
||||
"val": "test-label-2",
|
||||
},
|
||||
],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(5)",
|
||||
},
|
||||
"size": 4114,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "hear that label_me label_me_2",
|
||||
},
|
||||
"replyCount": 1,
|
||||
"repostCount": 0,
|
||||
"uri": "record(6)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds thread proxy views handles deleted posts correctly 1`] = `
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"text": "Deletion thread",
|
||||
},
|
||||
"replyCount": 1,
|
||||
"repostCount": 0,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(3)/cids(1)@jpeg",
|
||||
"did": "user(2)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(4)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "Reply",
|
||||
},
|
||||
"replyCount": 1,
|
||||
"repostCount": 0,
|
||||
"uri": "record(3)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(4)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(2)",
|
||||
"uri": "record(3)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "Reply reply",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(5)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds thread proxy views handles deleted posts correctly 2`] = `
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"text": "Deletion thread",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds thread proxy views handles deleted posts correctly 3`] = `
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"parent": Object {
|
||||
"$type": "app.bsky.feed.defs#notFoundPost",
|
||||
"notFound": true,
|
||||
"uri": "record(4)",
|
||||
},
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(3)",
|
||||
"uri": "record(4)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(2)",
|
||||
"uri": "record(3)",
|
||||
},
|
||||
},
|
||||
"text": "Reply reply",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`pds thread proxy views includes the muted status of post authors. 1`] = `
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
"cid": "cids(0)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 3,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000000Z",
|
||||
"text": "again",
|
||||
},
|
||||
"replyCount": 2,
|
||||
"repostCount": 1,
|
||||
"uri": "record(0)",
|
||||
"viewer": Object {
|
||||
"like": "record(3)",
|
||||
},
|
||||
},
|
||||
"replies": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"did": "user(2)",
|
||||
"handle": "carol.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"following": "record(5)",
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(2)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "of course",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 0,
|
||||
"uri": "record(4)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [],
|
||||
},
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(4)/cids(1)@jpeg",
|
||||
"did": "user(3)",
|
||||
"displayName": "bobby",
|
||||
"handle": "bob.test",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(4)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(7)",
|
||||
"val": "test-label",
|
||||
},
|
||||
],
|
||||
"viewer": Object {
|
||||
"muted": false,
|
||||
},
|
||||
},
|
||||
"cid": "cids(3)",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images#view",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"fullsize": "https://bsky.public.url/image/sig()/rs:fit:2000:2000:1:0/plain/user(4)/cids(5)@jpeg",
|
||||
"thumb": "https://bsky.public.url/image/sig()/rs:fit:1000:1000:1:0/plain/user(4)/cids(5)@jpeg",
|
||||
},
|
||||
],
|
||||
},
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(6)",
|
||||
"val": "test-label",
|
||||
},
|
||||
Object {
|
||||
"cid": "cids(3)",
|
||||
"cts": "1970-01-01T00:00:00.000Z",
|
||||
"neg": false,
|
||||
"src": "did:example:labeler",
|
||||
"uri": "record(6)",
|
||||
"val": "test-label-2",
|
||||
},
|
||||
],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"embed": Object {
|
||||
"$type": "app.bsky.embed.images",
|
||||
"images": Array [
|
||||
Object {
|
||||
"alt": "tests/image/fixtures/key-landscape-small.jpg",
|
||||
"image": Object {
|
||||
"$type": "blob",
|
||||
"mimeType": "image/jpeg",
|
||||
"ref": Object {
|
||||
"$link": "cids(5)",
|
||||
},
|
||||
"size": 4114,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "hear that label_me label_me_2",
|
||||
},
|
||||
"replyCount": 1,
|
||||
"repostCount": 0,
|
||||
"uri": "record(6)",
|
||||
"viewer": Object {},
|
||||
},
|
||||
"replies": Array [
|
||||
Object {
|
||||
"$type": "app.bsky.feed.defs#threadViewPost",
|
||||
"post": Object {
|
||||
"$type": "app.bsky.feed.defs#postView",
|
||||
"author": Object {
|
||||
"avatar": "https://bsky.public.url/image/sig()/rs:fill:1000:1000:1:0/plain/user(1)/cids(1)@jpeg",
|
||||
"did": "user(0)",
|
||||
"displayName": "ali",
|
||||
"handle": "alice.test",
|
||||
"labels": Array [],
|
||||
"viewer": Object {
|
||||
"followedBy": "record(2)",
|
||||
"following": "record(1)",
|
||||
"muted": true,
|
||||
},
|
||||
},
|
||||
"cid": "cids(6)",
|
||||
"indexedAt": "1970-01-01T00:00:00.000Z",
|
||||
"labels": Array [],
|
||||
"likeCount": 0,
|
||||
"record": Object {
|
||||
"$type": "app.bsky.feed.post",
|
||||
"createdAt": "1970-01-01T00:00:00.000Z",
|
||||
"reply": Object {
|
||||
"parent": Object {
|
||||
"cid": "cids(3)",
|
||||
"uri": "record(6)",
|
||||
},
|
||||
"root": Object {
|
||||
"cid": "cids(0)",
|
||||
"uri": "record(0)",
|
||||
},
|
||||
},
|
||||
"text": "thanks bob",
|
||||
},
|
||||
"replyCount": 0,
|
||||
"repostCount": 1,
|
||||
"uri": "record(8)",
|
||||
"viewer": Object {
|
||||
"repost": "record(9)",
|
||||
},
|
||||
},
|
||||
"replies": Array [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
`;
|
File diff suppressed because it is too large
Load Diff
@ -1,185 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { forSnapshot, paginateAll } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import usersBulkSeed from '../seeds/users-bulk'
|
||||
import { wait } from '@atproto/common'
|
||||
|
||||
describe('pds user search proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
let headers: { [s: string]: string }
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_user_search',
|
||||
})
|
||||
agent = new AtpAgent({ service: network.pds.url })
|
||||
sc = new SeedClient(agent)
|
||||
await wait(50) // allow pending sub to be established
|
||||
await network.bsky.sub.destroy()
|
||||
await usersBulkSeed(sc)
|
||||
|
||||
// Skip did/handle resolution for expediency
|
||||
const { db } = network.bsky.ctx
|
||||
const now = new Date().toISOString()
|
||||
await db.db
|
||||
.insertInto('actor')
|
||||
.values(
|
||||
Object.entries(sc.dids).map(([handle, did]) => ({
|
||||
did,
|
||||
handle,
|
||||
indexedAt: now,
|
||||
})),
|
||||
)
|
||||
.onConflict((oc) => oc.doNothing())
|
||||
.execute()
|
||||
|
||||
// Process remaining profiles
|
||||
network.bsky.sub.resume()
|
||||
await network.processAll(50000)
|
||||
headers = sc.getHeaders(Object.values(sc.dids)[0])
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('typeahead gives relevant results', async () => {
|
||||
const result = await agent.api.app.bsky.actor.searchActorsTypeahead(
|
||||
{ term: 'car' },
|
||||
{ headers },
|
||||
)
|
||||
|
||||
const handles = result.data.actors.map((u) => u.handle)
|
||||
|
||||
const shouldContain = [
|
||||
'cara-wiegand69.test',
|
||||
'eudora-dietrich4.test', // Carol Littel
|
||||
'shane-torphy52.test', // Sadie Carter
|
||||
'aliya-hodkiewicz.test', // Carlton Abernathy IV
|
||||
'carlos6.test',
|
||||
'carolina-mcdermott77.test',
|
||||
]
|
||||
|
||||
shouldContain.forEach((handle) => expect(handles).toContain(handle))
|
||||
|
||||
const shouldNotContain = [
|
||||
'sven70.test',
|
||||
'hilario84.test',
|
||||
'santa-hermann78.test',
|
||||
'dylan61.test',
|
||||
'preston-harris.test',
|
||||
'loyce95.test',
|
||||
'melyna-zboncak.test',
|
||||
]
|
||||
|
||||
shouldNotContain.forEach((handle) => expect(handles).not.toContain(handle))
|
||||
|
||||
expect(forSnapshot(result.data.actors)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('typeahead gives empty result set when provided empty term', async () => {
|
||||
const result = await agent.api.app.bsky.actor.searchActorsTypeahead(
|
||||
{ term: '' },
|
||||
{ headers },
|
||||
)
|
||||
|
||||
expect(result.data.actors).toEqual([])
|
||||
})
|
||||
|
||||
it('typeahead applies limit', async () => {
|
||||
const full = await agent.api.app.bsky.actor.searchActorsTypeahead(
|
||||
{ term: 'p' },
|
||||
{ headers },
|
||||
)
|
||||
|
||||
expect(full.data.actors.length).toBeGreaterThan(5)
|
||||
|
||||
const limited = await agent.api.app.bsky.actor.searchActorsTypeahead(
|
||||
{ term: 'p', limit: 5 },
|
||||
{ headers },
|
||||
)
|
||||
|
||||
expect(limited.data.actors).toEqual(full.data.actors.slice(0, 5))
|
||||
})
|
||||
|
||||
it('search gives relevant results', async () => {
|
||||
const result = await agent.api.app.bsky.actor.searchActors(
|
||||
{ term: 'car' },
|
||||
{ headers },
|
||||
)
|
||||
|
||||
const handles = result.data.actors.map((u) => u.handle)
|
||||
|
||||
const shouldContain = [
|
||||
'cara-wiegand69.test',
|
||||
'eudora-dietrich4.test', // Carol Littel
|
||||
'shane-torphy52.test', //Sadie Carter
|
||||
'aliya-hodkiewicz.test', // Carlton Abernathy IV
|
||||
'carlos6.test',
|
||||
'carolina-mcdermott77.test',
|
||||
]
|
||||
|
||||
shouldContain.forEach((handle) => expect(handles).toContain(handle))
|
||||
|
||||
const shouldNotContain = [
|
||||
'sven70.test',
|
||||
'hilario84.test',
|
||||
'santa-hermann78.test',
|
||||
'dylan61.test',
|
||||
'preston-harris.test',
|
||||
'loyce95.test',
|
||||
'melyna-zboncak.test',
|
||||
]
|
||||
|
||||
shouldNotContain.forEach((handle) => expect(handles).not.toContain(handle))
|
||||
|
||||
expect(forSnapshot(result.data.actors)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('search gives empty result set when provided empty term', async () => {
|
||||
const result = await agent.api.app.bsky.actor.searchActors(
|
||||
{ term: '' },
|
||||
{ headers },
|
||||
)
|
||||
|
||||
expect(result.data.actors).toEqual([])
|
||||
})
|
||||
|
||||
it('paginates', async () => {
|
||||
const results = (results) => results.flatMap((res) => res.actors)
|
||||
const paginator = async (cursor?: string) => {
|
||||
const res = await agent.api.app.bsky.actor.searchActors(
|
||||
{ term: 'p', cursor, limit: 3 },
|
||||
{ headers },
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
const paginatedAll = await paginateAll(paginator)
|
||||
paginatedAll.forEach((res) =>
|
||||
expect(res.actors.length).toBeLessThanOrEqual(3),
|
||||
)
|
||||
|
||||
const full = await agent.api.app.bsky.actor.searchActors(
|
||||
{ term: 'p' },
|
||||
{ headers },
|
||||
)
|
||||
|
||||
expect(full.data.actors.length).toBeGreaterThan(5)
|
||||
expect(results(paginatedAll)).toEqual(results([full.data]))
|
||||
})
|
||||
|
||||
it('search handles bad input', async () => {
|
||||
// Mostly for sqlite's benefit, since it uses LIKE and these are special characters that will
|
||||
// get stripped. This input triggers a special case where there are no "safe" words for sqlite to search on.
|
||||
const result = await agent.api.app.bsky.actor.searchActors(
|
||||
{ term: ' % _ ' },
|
||||
{ headers },
|
||||
)
|
||||
|
||||
expect(result.data.actors).toEqual([])
|
||||
})
|
||||
})
|
@ -1,147 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { forSnapshot, paginateAll } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
|
||||
describe('pds author feed proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
let bob: string
|
||||
let carol: string
|
||||
let dan: string
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_author_feed',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await basicSeed(sc)
|
||||
alice = sc.dids.alice
|
||||
bob = sc.dids.bob
|
||||
carol = sc.dids.carol
|
||||
dan = sc.dids.dan
|
||||
await network.pds.ctx.labeler.processAll()
|
||||
await network.processAll()
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('fetches full author feeds for self (sorted, minimal viewer state).', async () => {
|
||||
const aliceForAlice = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{ actor: sc.accounts[alice].handle },
|
||||
{
|
||||
headers: sc.getHeaders(alice),
|
||||
},
|
||||
)
|
||||
|
||||
expect(forSnapshot(aliceForAlice.data.feed)).toMatchSnapshot()
|
||||
|
||||
const bobForBob = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{ actor: sc.accounts[bob].handle },
|
||||
{
|
||||
headers: sc.getHeaders(bob),
|
||||
},
|
||||
)
|
||||
|
||||
expect(forSnapshot(bobForBob.data.feed)).toMatchSnapshot()
|
||||
|
||||
const carolForCarol = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{ actor: sc.accounts[carol].handle },
|
||||
{
|
||||
headers: sc.getHeaders(carol),
|
||||
},
|
||||
)
|
||||
|
||||
expect(forSnapshot(carolForCarol.data.feed)).toMatchSnapshot()
|
||||
|
||||
const danForDan = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{ actor: sc.accounts[dan].handle },
|
||||
{
|
||||
headers: sc.getHeaders(dan),
|
||||
},
|
||||
)
|
||||
|
||||
expect(forSnapshot(danForDan.data.feed)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("reflects fetching user's state in the feed.", async () => {
|
||||
const aliceForCarol = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{ actor: sc.accounts[alice].handle },
|
||||
{
|
||||
headers: sc.getHeaders(carol),
|
||||
},
|
||||
)
|
||||
|
||||
aliceForCarol.data.feed.forEach((postView) => {
|
||||
const { viewer, uri } = postView.post
|
||||
expect(viewer?.like).toEqual(sc.likes[carol]?.[uri]?.toString())
|
||||
expect(viewer?.repost).toEqual(sc.reposts[carol][uri]?.toString())
|
||||
})
|
||||
|
||||
expect(forSnapshot(aliceForCarol.data.feed)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('omits reposts from muted users.', async () => {
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: alice }, // Has a repost by dan: will be omitted from dan's feed
|
||||
{ headers: sc.getHeaders(bob), encoding: 'application/json' },
|
||||
)
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: dan }, // Feed author: their posts will still appear
|
||||
{ headers: sc.getHeaders(bob), encoding: 'application/json' },
|
||||
)
|
||||
const bobForDan = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{ actor: sc.accounts[dan].handle },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(bobForDan.data.feed)).toMatchSnapshot()
|
||||
|
||||
await agent.api.app.bsky.graph.unmuteActor(
|
||||
{ actor: alice },
|
||||
{ headers: sc.getHeaders(bob), encoding: 'application/json' },
|
||||
)
|
||||
await agent.api.app.bsky.graph.unmuteActor(
|
||||
{ actor: dan },
|
||||
{ headers: sc.getHeaders(bob), encoding: 'application/json' },
|
||||
)
|
||||
})
|
||||
|
||||
it('paginates', async () => {
|
||||
const results = (results) => results.flatMap((res) => res.feed)
|
||||
const paginator = async (cursor?: string) => {
|
||||
const res = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{
|
||||
actor: sc.accounts[alice].handle,
|
||||
cursor,
|
||||
limit: 2,
|
||||
},
|
||||
{ headers: sc.getHeaders(dan) },
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
const paginatedAll = await paginateAll(paginator)
|
||||
paginatedAll.forEach((res) =>
|
||||
expect(res.feed.length).toBeLessThanOrEqual(2),
|
||||
)
|
||||
|
||||
const full = await agent.api.app.bsky.feed.getAuthorFeed(
|
||||
{
|
||||
actor: sc.accounts[alice].handle,
|
||||
},
|
||||
{ headers: sc.getHeaders(dan) },
|
||||
)
|
||||
|
||||
expect(full.data.feed.length).toEqual(4)
|
||||
expect(results(paginatedAll)).toEqual(results([full.data]))
|
||||
})
|
||||
})
|
@ -1,183 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { forSnapshot, paginateAll } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import followsSeed from '../seeds/follows'
|
||||
|
||||
describe('pds follow proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_follows',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await followsSeed(sc)
|
||||
await network.processAll()
|
||||
alice = sc.dids.alice
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('fetches followers', async () => {
|
||||
const aliceFollowers = await agent.api.app.bsky.graph.getFollowers(
|
||||
{ actor: sc.dids.alice },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(aliceFollowers.data)).toMatchSnapshot()
|
||||
|
||||
const bobFollowers = await agent.api.app.bsky.graph.getFollowers(
|
||||
{ actor: sc.dids.bob },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(bobFollowers.data)).toMatchSnapshot()
|
||||
|
||||
const carolFollowers = await agent.api.app.bsky.graph.getFollowers(
|
||||
{ actor: sc.dids.carol },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(carolFollowers.data)).toMatchSnapshot()
|
||||
|
||||
const danFollowers = await agent.api.app.bsky.graph.getFollowers(
|
||||
{ actor: sc.dids.dan },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(danFollowers.data)).toMatchSnapshot()
|
||||
|
||||
const eveFollowers = await agent.api.app.bsky.graph.getFollowers(
|
||||
{ actor: sc.dids.eve },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(eveFollowers.data)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fetches followers by handle', async () => {
|
||||
const byDid = await agent.api.app.bsky.graph.getFollowers(
|
||||
{ actor: sc.dids.alice },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
const byHandle = await agent.api.app.bsky.graph.getFollowers(
|
||||
{ actor: sc.accounts[alice].handle },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
expect(byHandle.data).toEqual(byDid.data)
|
||||
})
|
||||
|
||||
it('paginates followers', async () => {
|
||||
const results = (results) => results.flatMap((res) => res.followers)
|
||||
const paginator = async (cursor?: string) => {
|
||||
const res = await agent.api.app.bsky.graph.getFollowers(
|
||||
{
|
||||
actor: sc.dids.alice,
|
||||
cursor,
|
||||
limit: 2,
|
||||
},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
const paginatedAll = await paginateAll(paginator)
|
||||
paginatedAll.forEach((res) =>
|
||||
expect(res.followers.length).toBeLessThanOrEqual(2),
|
||||
)
|
||||
|
||||
const full = await agent.api.app.bsky.graph.getFollowers(
|
||||
{ actor: sc.dids.alice },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(full.data.followers.length).toEqual(4)
|
||||
expect(results(paginatedAll)).toEqual(results([full.data]))
|
||||
})
|
||||
|
||||
it('fetches follows', async () => {
|
||||
const aliceFollows = await agent.api.app.bsky.graph.getFollows(
|
||||
{ actor: sc.dids.alice },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(aliceFollows.data)).toMatchSnapshot()
|
||||
|
||||
const bobFollows = await agent.api.app.bsky.graph.getFollows(
|
||||
{ actor: sc.dids.bob },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(bobFollows.data)).toMatchSnapshot()
|
||||
|
||||
const carolFollows = await agent.api.app.bsky.graph.getFollows(
|
||||
{ actor: sc.dids.carol },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(carolFollows.data)).toMatchSnapshot()
|
||||
|
||||
const danFollows = await agent.api.app.bsky.graph.getFollows(
|
||||
{ actor: sc.dids.dan },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(danFollows.data)).toMatchSnapshot()
|
||||
|
||||
const eveFollows = await agent.api.app.bsky.graph.getFollows(
|
||||
{ actor: sc.dids.eve },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(eveFollows.data)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fetches follows by handle', async () => {
|
||||
const byDid = await agent.api.app.bsky.graph.getFollows(
|
||||
{ actor: sc.dids.alice },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
const byHandle = await agent.api.app.bsky.graph.getFollows(
|
||||
{ actor: sc.accounts[alice].handle },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
expect(byHandle.data).toEqual(byDid.data)
|
||||
})
|
||||
|
||||
it('paginates follows', async () => {
|
||||
const results = (results) => results.flatMap((res) => res.follows)
|
||||
const paginator = async (cursor?: string) => {
|
||||
const res = await agent.api.app.bsky.graph.getFollows(
|
||||
{
|
||||
actor: sc.dids.alice,
|
||||
cursor,
|
||||
limit: 2,
|
||||
},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
const paginatedAll = await paginateAll(paginator)
|
||||
paginatedAll.forEach((res) =>
|
||||
expect(res.follows.length).toBeLessThanOrEqual(2),
|
||||
)
|
||||
|
||||
const full = await agent.api.app.bsky.graph.getFollows(
|
||||
{ actor: sc.dids.alice },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(full.data.follows.length).toEqual(4)
|
||||
expect(results(paginatedAll)).toEqual(results([full.data]))
|
||||
})
|
||||
})
|
@ -1,91 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import likesSeed from '../seeds/likes'
|
||||
import { constantDate, forSnapshot, paginateAll } from '../_util'
|
||||
|
||||
describe('pds like proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
let bob: string
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_likes',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await likesSeed(sc)
|
||||
await network.processAll()
|
||||
alice = sc.dids.alice
|
||||
bob = sc.dids.bob
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
const getCursors = (items: { createdAt?: string }[]) =>
|
||||
items.map((item) => item.createdAt ?? constantDate)
|
||||
|
||||
const getSortedCursors = (items: { createdAt?: string }[]) =>
|
||||
getCursors(items).sort((a, b) => tstamp(b) - tstamp(a))
|
||||
|
||||
const tstamp = (x: string) => new Date(x).getTime()
|
||||
|
||||
it('fetches post likes', async () => {
|
||||
const alicePost = await agent.api.app.bsky.feed.getLikes(
|
||||
{ uri: sc.posts[alice][1].ref.uriStr },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(alicePost.data)).toMatchSnapshot()
|
||||
expect(getCursors(alicePost.data.likes)).toEqual(
|
||||
getSortedCursors(alicePost.data.likes),
|
||||
)
|
||||
})
|
||||
|
||||
it('fetches reply likes', async () => {
|
||||
const bobReply = await agent.api.app.bsky.feed.getLikes(
|
||||
{ uri: sc.replies[bob][0].ref.uriStr },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(bobReply.data)).toMatchSnapshot()
|
||||
expect(getCursors(bobReply.data.likes)).toEqual(
|
||||
getSortedCursors(bobReply.data.likes),
|
||||
)
|
||||
})
|
||||
|
||||
it('paginates', async () => {
|
||||
const results = (results) => results.flatMap((res) => res.likes)
|
||||
const paginator = async (cursor?: string) => {
|
||||
const res = await agent.api.app.bsky.feed.getLikes(
|
||||
{
|
||||
uri: sc.posts[alice][1].ref.uriStr,
|
||||
cursor,
|
||||
limit: 2,
|
||||
},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
const paginatedAll = await paginateAll(paginator)
|
||||
paginatedAll.forEach((res) =>
|
||||
expect(res.likes.length).toBeLessThanOrEqual(2),
|
||||
)
|
||||
|
||||
const full = await agent.api.app.bsky.feed.getLikes(
|
||||
{ uri: sc.posts[alice][1].ref.uriStr },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(full.data.likes.length).toEqual(4)
|
||||
expect(results(paginatedAll)).toEqual(results([full.data]))
|
||||
})
|
||||
})
|
@ -1,211 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { forSnapshot, paginateAll } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
import { Notification } from '../../src/lexicon/types/app/bsky/notification/listNotifications'
|
||||
|
||||
describe('pds notification proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_notifications',
|
||||
})
|
||||
agent = new AtpAgent({ service: network.pds.url })
|
||||
sc = new SeedClient(agent)
|
||||
await basicSeed(sc)
|
||||
await network.processAll()
|
||||
alice = sc.dids.alice
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
const sort = (notifs: Notification[]) => {
|
||||
return notifs.sort((a, b) => {
|
||||
if (a.indexedAt === b.indexedAt) {
|
||||
return a.uri > b.uri ? -1 : 1
|
||||
}
|
||||
return a.indexedAt > b.indexedAt ? -a : 1
|
||||
})
|
||||
}
|
||||
|
||||
it('fetches notification count without a last-seen', async () => {
|
||||
const notifCountAlice =
|
||||
await agent.api.app.bsky.notification.getUnreadCount(
|
||||
{},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(notifCountAlice.data.count).toBe(11)
|
||||
|
||||
const notifCountBob = await agent.api.app.bsky.notification.getUnreadCount(
|
||||
{},
|
||||
{ headers: sc.getHeaders(sc.dids.bob) },
|
||||
)
|
||||
|
||||
expect(notifCountBob.data.count).toBe(4)
|
||||
})
|
||||
|
||||
it('generates notifications for all reply ancestors', async () => {
|
||||
// Add to reply chain, post ancestors: alice -> bob -> alice -> carol.
|
||||
// Should have added one notification for each of alice and bob.
|
||||
await sc.reply(
|
||||
sc.dids.carol,
|
||||
sc.posts[alice][1].ref,
|
||||
sc.replies[alice][0].ref,
|
||||
'indeed',
|
||||
)
|
||||
|
||||
await network.processAll()
|
||||
|
||||
const notifCountAlice =
|
||||
await agent.api.app.bsky.notification.getUnreadCount(
|
||||
{},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(notifCountAlice.data.count).toBe(12)
|
||||
|
||||
const notifCountBob = await agent.api.app.bsky.notification.getUnreadCount(
|
||||
{},
|
||||
{ headers: sc.getHeaders(sc.dids.bob) },
|
||||
)
|
||||
|
||||
expect(notifCountBob.data.count).toBe(5)
|
||||
})
|
||||
|
||||
it('generates notifications for quotes', async () => {
|
||||
// Dan was quoted by alice
|
||||
const notifsDan = await agent.api.app.bsky.notification.listNotifications(
|
||||
{},
|
||||
{ headers: sc.getHeaders(sc.dids.dan) },
|
||||
)
|
||||
expect(forSnapshot(notifsDan.data)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fetches notifications without a last-seen', async () => {
|
||||
const notifRes = await agent.api.app.bsky.notification.listNotifications(
|
||||
{},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
const notifs = sort(notifRes.data.notifications)
|
||||
expect(notifs.length).toBe(12)
|
||||
|
||||
const readStates = notifs.map((notif) => notif.isRead)
|
||||
expect(readStates).toEqual(notifs.map(() => false))
|
||||
|
||||
// @TODO while the exact order of these is not critically important,
|
||||
// it's odd to see carol's follow after bob's. In the seed they occur in
|
||||
// the opposite ordering.
|
||||
expect(forSnapshot(notifs)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fetches notifications omitting records by a muted user', async () => {
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: sc.dids.carol }, // Replier
|
||||
{ headers: sc.getHeaders(alice), encoding: 'application/json' },
|
||||
)
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: sc.dids.dan }, // Mentioner
|
||||
{ headers: sc.getHeaders(alice), encoding: 'application/json' },
|
||||
)
|
||||
|
||||
const notifRes = await agent.api.app.bsky.notification.listNotifications(
|
||||
{},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
const notifs = sort(notifRes.data.notifications)
|
||||
expect(notifs.length).toBe(4)
|
||||
expect(forSnapshot(notifs)).toMatchSnapshot()
|
||||
|
||||
// Cleanup
|
||||
await agent.api.app.bsky.graph.unmuteActor(
|
||||
{ actor: sc.dids.carol },
|
||||
{ headers: sc.getHeaders(alice), encoding: 'application/json' },
|
||||
)
|
||||
await agent.api.app.bsky.graph.unmuteActor(
|
||||
{ actor: sc.dids.dan },
|
||||
{ headers: sc.getHeaders(alice), encoding: 'application/json' },
|
||||
)
|
||||
})
|
||||
|
||||
it('paginates', async () => {
|
||||
const results = (results) =>
|
||||
sort(results.flatMap((res) => res.notifications))
|
||||
const paginator = async (cursor?: string) => {
|
||||
const res = await agent.api.app.bsky.notification.listNotifications(
|
||||
{
|
||||
cursor,
|
||||
limit: 6,
|
||||
},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
const paginatedAll = await paginateAll(paginator)
|
||||
paginatedAll.forEach((res) =>
|
||||
expect(res.notifications.length).toBeLessThanOrEqual(6),
|
||||
)
|
||||
|
||||
const full = await agent.api.app.bsky.notification.listNotifications(
|
||||
{},
|
||||
{
|
||||
headers: sc.getHeaders(alice),
|
||||
},
|
||||
)
|
||||
|
||||
expect(full.data.notifications.length).toEqual(12)
|
||||
expect(results(paginatedAll)).toEqual(results([full.data]))
|
||||
})
|
||||
|
||||
it('updates notifications last seen', async () => {
|
||||
const full = await agent.api.app.bsky.notification.listNotifications(
|
||||
{},
|
||||
{
|
||||
headers: sc.getHeaders(alice),
|
||||
},
|
||||
)
|
||||
|
||||
await agent.api.app.bsky.notification.updateSeen(
|
||||
{ seenAt: full.data.notifications[3].indexedAt },
|
||||
{ encoding: 'application/json', headers: sc.getHeaders(alice) },
|
||||
)
|
||||
})
|
||||
|
||||
it('fetches notification count with a last-seen', async () => {
|
||||
const notifCount = await agent.api.app.bsky.notification.getUnreadCount(
|
||||
{},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(notifCount.data.count).toBe(3)
|
||||
})
|
||||
|
||||
it('fetches notifications with a last-seen', async () => {
|
||||
const notifRes = await agent.api.app.bsky.notification.listNotifications(
|
||||
{},
|
||||
{
|
||||
headers: sc.getHeaders(alice),
|
||||
},
|
||||
)
|
||||
|
||||
const notifs = sort(notifRes.data.notifications)
|
||||
expect(notifs.length).toBe(12)
|
||||
|
||||
const readStates = notifs.map((notif) => notif.isRead)
|
||||
expect(readStates).toEqual(notifs.map((_, i) => i >= 3))
|
||||
|
||||
expect(forSnapshot(notifs)).toMatchSnapshot()
|
||||
})
|
||||
})
|
@ -1,106 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
|
||||
describe('popular proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
let bob: string
|
||||
let carol: string
|
||||
let dan: string
|
||||
let eve: string
|
||||
let frank: string
|
||||
|
||||
const account = {
|
||||
email: 'blah@test.com',
|
||||
password: 'blh-pass',
|
||||
}
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_popular',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await basicSeed(sc)
|
||||
await sc.createAccount('eve', {
|
||||
...account,
|
||||
email: 'eve@test.com',
|
||||
handle: 'eve.test',
|
||||
password: 'eve-pass',
|
||||
})
|
||||
await sc.createAccount('frank', {
|
||||
...account,
|
||||
email: 'frank@test.com',
|
||||
handle: 'frank.test',
|
||||
password: 'frank-pass',
|
||||
})
|
||||
await network.processAll()
|
||||
alice = sc.dids.alice
|
||||
bob = sc.dids.bob
|
||||
carol = sc.dids.carol
|
||||
dan = sc.dids.dan
|
||||
eve = sc.dids.eve
|
||||
frank = sc.dids.frank
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('returns well liked posts', async () => {
|
||||
const img = await sc.uploadFile(
|
||||
alice,
|
||||
'tests/image/fixtures/key-landscape-small.jpg',
|
||||
'image/jpeg',
|
||||
)
|
||||
const one = await sc.post(alice, 'first post', undefined, [img])
|
||||
await sc.like(bob, one.ref)
|
||||
await sc.like(carol, one.ref)
|
||||
await sc.like(dan, one.ref)
|
||||
await sc.like(eve, one.ref)
|
||||
await sc.like(frank, one.ref)
|
||||
const two = await sc.post(bob, 'bobby boi')
|
||||
await sc.like(alice, two.ref)
|
||||
await sc.like(carol, two.ref)
|
||||
await sc.like(dan, two.ref)
|
||||
await sc.like(eve, two.ref)
|
||||
await sc.like(frank, two.ref)
|
||||
const three = await sc.reply(bob, one.ref, one.ref, 'reply')
|
||||
await sc.like(alice, three.ref)
|
||||
await sc.like(carol, three.ref)
|
||||
await sc.like(dan, three.ref)
|
||||
await sc.like(eve, three.ref)
|
||||
await sc.like(frank, three.ref)
|
||||
|
||||
await network.processAll()
|
||||
|
||||
const res = await agent.api.app.bsky.unspecced.getPopular(
|
||||
{},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
const feedUris = res.data.feed.map((i) => i.post.uri).sort()
|
||||
const expected = [one.ref.uriStr, two.ref.uriStr, three.ref.uriStr].sort()
|
||||
expect(feedUris).toEqual(expected)
|
||||
})
|
||||
|
||||
it('does not return muted posts', async () => {
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: bob },
|
||||
{ headers: sc.getHeaders(alice), encoding: 'application/json' },
|
||||
)
|
||||
|
||||
const res = await agent.api.app.bsky.unspecced.getPopular(
|
||||
{},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
expect(res.data.feed.length).toBe(1)
|
||||
const dids = res.data.feed.map((post) => post.post.author.did)
|
||||
expect(dids.includes(bob)).toBe(false)
|
||||
})
|
||||
})
|
@ -1,66 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { forSnapshot } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
|
||||
describe('pds posts views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_posts',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await basicSeed(sc)
|
||||
await network.processAll()
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('fetches posts', async () => {
|
||||
const uris = [
|
||||
sc.posts[sc.dids.alice][0].ref.uriStr,
|
||||
sc.posts[sc.dids.alice][1].ref.uriStr,
|
||||
sc.posts[sc.dids.bob][0].ref.uriStr,
|
||||
sc.posts[sc.dids.carol][0].ref.uriStr,
|
||||
sc.posts[sc.dids.dan][1].ref.uriStr,
|
||||
sc.replies[sc.dids.alice][0].ref.uriStr,
|
||||
]
|
||||
const posts = await agent.api.app.bsky.feed.getPosts(
|
||||
{ uris },
|
||||
{ headers: sc.getHeaders(sc.dids.alice) },
|
||||
)
|
||||
|
||||
expect(posts.data.posts.length).toBe(uris.length)
|
||||
expect(forSnapshot(posts.data.posts)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('handles repeat uris', async () => {
|
||||
const uris = [
|
||||
sc.posts[sc.dids.alice][0].ref.uriStr,
|
||||
sc.posts[sc.dids.alice][0].ref.uriStr,
|
||||
sc.posts[sc.dids.bob][0].ref.uriStr,
|
||||
sc.posts[sc.dids.alice][0].ref.uriStr,
|
||||
sc.posts[sc.dids.bob][0].ref.uriStr,
|
||||
]
|
||||
|
||||
const posts = await agent.api.app.bsky.feed.getPosts(
|
||||
{ uris },
|
||||
{ headers: sc.getHeaders(sc.dids.alice) },
|
||||
)
|
||||
|
||||
expect(posts.data.posts.length).toBe(2)
|
||||
const recivedUris = posts.data.posts.map((p) => p.uri).sort()
|
||||
const expected = [
|
||||
sc.posts[sc.dids.alice][0].ref.uriStr,
|
||||
sc.posts[sc.dids.bob][0].ref.uriStr,
|
||||
].sort()
|
||||
expect(recivedUris).toEqual(expected)
|
||||
})
|
||||
})
|
@ -1,142 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { forSnapshot } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
|
||||
describe('pds profile proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
let bob: string
|
||||
let dan: string
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_profile',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await basicSeed(sc)
|
||||
await network.processAll()
|
||||
alice = sc.dids.alice
|
||||
bob = sc.dids.bob
|
||||
dan = sc.dids.dan
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('fetches own profile', async () => {
|
||||
const aliceForAlice = await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: alice },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(aliceForAlice.data)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("fetches other's profile, with a follow", async () => {
|
||||
const aliceForBob = await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: alice },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(aliceForBob.data)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("fetches other's profile, without a follow", async () => {
|
||||
const danForBob = await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: dan },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(danForBob.data)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fetches multiple profiles', async () => {
|
||||
const {
|
||||
data: { profiles },
|
||||
} = await agent.api.app.bsky.actor.getProfiles(
|
||||
{
|
||||
actors: [
|
||||
alice,
|
||||
'bob.test',
|
||||
'did:example:missing',
|
||||
'carol.test',
|
||||
dan,
|
||||
'missing.test',
|
||||
],
|
||||
},
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(profiles.map((p) => p.handle)).toEqual([
|
||||
'alice.test',
|
||||
'bob.test',
|
||||
'carol.test',
|
||||
'dan.test',
|
||||
])
|
||||
|
||||
expect(forSnapshot(profiles)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fetches profile by handle', async () => {
|
||||
const byDid = await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: alice },
|
||||
{
|
||||
headers: sc.getHeaders(bob),
|
||||
},
|
||||
)
|
||||
|
||||
const byHandle = await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: sc.accounts[alice].handle },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(byHandle.data).toEqual(byDid.data)
|
||||
})
|
||||
|
||||
it('includes muted status.', async () => {
|
||||
const { data: initial } = await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: alice },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(initial.viewer?.muted).toEqual(false)
|
||||
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: alice },
|
||||
{ headers: sc.getHeaders(bob), encoding: 'application/json' },
|
||||
)
|
||||
const { data: muted } = await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: alice },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(muted.viewer?.muted).toEqual(true)
|
||||
|
||||
const { data: fromBobUnrelated } =
|
||||
await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: dan },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
const { data: toAliceUnrelated } =
|
||||
await agent.api.app.bsky.actor.getProfile(
|
||||
{ actor: alice },
|
||||
{ headers: sc.getHeaders(dan) },
|
||||
)
|
||||
|
||||
expect(fromBobUnrelated.viewer?.muted).toEqual(false)
|
||||
expect(toAliceUnrelated.viewer?.muted).toEqual(false)
|
||||
|
||||
await agent.api.app.bsky.graph.unmuteActor(
|
||||
{ actor: alice },
|
||||
{ headers: sc.getHeaders(bob), encoding: 'application/json' },
|
||||
)
|
||||
})
|
||||
})
|
@ -1,77 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { forSnapshot, paginateAll } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import repostsSeed from '../seeds/reposts'
|
||||
|
||||
describe('pds repost proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
let bob: string
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_reposts',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await repostsSeed(sc)
|
||||
await network.processAll()
|
||||
alice = sc.dids.alice
|
||||
bob = sc.dids.bob
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('fetches reposted-by for a post', async () => {
|
||||
const view = await agent.api.app.bsky.feed.getRepostedBy(
|
||||
{ uri: sc.posts[alice][2].ref.uriStr },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
expect(view.data.uri).toEqual(sc.posts[sc.dids.alice][2].ref.uriStr)
|
||||
expect(forSnapshot(view.data.repostedBy)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fetches reposted-by for a reply', async () => {
|
||||
const view = await agent.api.app.bsky.feed.getRepostedBy(
|
||||
{ uri: sc.replies[bob][0].ref.uriStr },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
expect(view.data.uri).toEqual(sc.replies[sc.dids.bob][0].ref.uriStr)
|
||||
expect(forSnapshot(view.data.repostedBy)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('paginates', async () => {
|
||||
const results = (results) => results.flatMap((res) => res.repostedBy)
|
||||
const paginator = async (cursor?: string) => {
|
||||
const res = await agent.api.app.bsky.feed.getRepostedBy(
|
||||
{
|
||||
uri: sc.posts[alice][2].ref.uriStr,
|
||||
cursor,
|
||||
limit: 2,
|
||||
},
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
const paginatedAll = await paginateAll(paginator)
|
||||
paginatedAll.forEach((res) =>
|
||||
expect(res.repostedBy.length).toBeLessThanOrEqual(2),
|
||||
)
|
||||
|
||||
const full = await agent.api.app.bsky.feed.getRepostedBy(
|
||||
{ uri: sc.posts[alice][2].ref.uriStr },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(full.data.repostedBy.length).toEqual(4)
|
||||
expect(results(paginatedAll)).toEqual(results([full.data]))
|
||||
})
|
||||
})
|
@ -1,75 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
|
||||
describe('pds user search proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_suggestions',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await basicSeed(sc)
|
||||
await network.processAll()
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('actor suggestion gives users', async () => {
|
||||
const result = await agent.api.app.bsky.actor.getSuggestions(
|
||||
{ limit: 3 },
|
||||
{ headers: sc.getHeaders(sc.dids.carol) },
|
||||
)
|
||||
|
||||
const handles = result.data.actors.map((u) => u.handle)
|
||||
const displayNames = result.data.actors.map((u) => u.displayName)
|
||||
|
||||
const shouldContain: { handle: string; displayName: string | null }[] = [
|
||||
{ handle: 'bob.test', displayName: 'bobby' },
|
||||
{ handle: 'dan.test', displayName: null },
|
||||
]
|
||||
|
||||
shouldContain.forEach((actor) => {
|
||||
expect(handles).toContain(actor.handle)
|
||||
if (actor.displayName) {
|
||||
expect(displayNames).toContain(actor.displayName)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
it('does not suggest followed users', async () => {
|
||||
const result = await agent.api.app.bsky.actor.getSuggestions(
|
||||
{ limit: 3 },
|
||||
{ headers: sc.getHeaders(sc.dids.alice) },
|
||||
)
|
||||
|
||||
// alice follows everyone
|
||||
expect(result.data.actors.length).toBe(0)
|
||||
})
|
||||
|
||||
it('paginates', async () => {
|
||||
const result1 = await agent.api.app.bsky.actor.getSuggestions(
|
||||
{ limit: 1 },
|
||||
{ headers: sc.getHeaders(sc.dids.carol) },
|
||||
)
|
||||
const result2 = await agent.api.app.bsky.actor.getSuggestions(
|
||||
{ limit: 1, cursor: result1.data.cursor },
|
||||
{ headers: sc.getHeaders(sc.dids.carol) },
|
||||
)
|
||||
|
||||
expect(result1.data.actors.length).toBe(1)
|
||||
expect(result1.data.actors[0].handle).toEqual('bob.test')
|
||||
expect(result1.data.actors[0].displayName).toEqual('bobby')
|
||||
|
||||
expect(result2.data.actors.length).toBe(1)
|
||||
expect(result2.data.actors[0].handle).toEqual('dan.test')
|
||||
expect(result2.data.actors[0].displayName).toBeUndefined()
|
||||
})
|
||||
})
|
@ -1,144 +0,0 @@
|
||||
import AtpAgent, { AppBskyFeedGetPostThread } from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { forSnapshot } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
|
||||
describe('pds thread proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
let bob: string
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_thread',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await basicSeed(sc)
|
||||
alice = sc.dids.alice
|
||||
bob = sc.dids.bob
|
||||
})
|
||||
|
||||
beforeAll(async () => {
|
||||
// Add a repost of a reply so that we can confirm viewer state in the thread
|
||||
await sc.repost(bob, sc.replies[alice][0].ref)
|
||||
await network.processAll()
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it('fetches deep post thread', async () => {
|
||||
const thread = await agent.api.app.bsky.feed.getPostThread(
|
||||
{ uri: sc.posts[alice][1].ref.uriStr },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(thread.data.thread)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fetches shallow post thread', async () => {
|
||||
const thread = await agent.api.app.bsky.feed.getPostThread(
|
||||
{ depth: 1, uri: sc.posts[alice][1].ref.uriStr },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(thread.data.thread)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fetches ancestors', async () => {
|
||||
const thread = await agent.api.app.bsky.feed.getPostThread(
|
||||
{ depth: 1, uri: sc.replies[alice][0].ref.uriStr },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(thread.data.thread)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it('fails for an unknown post', async () => {
|
||||
const promise = agent.api.app.bsky.feed.getPostThread(
|
||||
{ uri: 'at://did:example:fake/does.not.exist/self' },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
await expect(promise).rejects.toThrow(
|
||||
AppBskyFeedGetPostThread.NotFoundError,
|
||||
)
|
||||
})
|
||||
|
||||
it('includes the muted status of post authors.', async () => {
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: alice },
|
||||
{ headers: sc.getHeaders(bob), encoding: 'application/json' },
|
||||
)
|
||||
const thread = await agent.api.app.bsky.feed.getPostThread(
|
||||
{ uri: sc.posts[alice][1].ref.uriStr },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(thread.data.thread)).toMatchSnapshot()
|
||||
|
||||
await agent.api.app.bsky.graph.unmuteActor(
|
||||
{ actor: alice },
|
||||
{ encoding: 'application/json', headers: sc.getHeaders(bob) },
|
||||
)
|
||||
})
|
||||
|
||||
it('handles deleted posts correctly', async () => {
|
||||
const alice = sc.dids.alice
|
||||
const bob = sc.dids.bob
|
||||
|
||||
const indexes = {
|
||||
aliceRoot: -1,
|
||||
bobReply: -1,
|
||||
aliceReplyReply: -1,
|
||||
}
|
||||
|
||||
await sc.post(alice, 'Deletion thread')
|
||||
indexes.aliceRoot = sc.posts[alice].length - 1
|
||||
|
||||
await sc.reply(
|
||||
bob,
|
||||
sc.posts[alice][indexes.aliceRoot].ref,
|
||||
sc.posts[alice][indexes.aliceRoot].ref,
|
||||
'Reply',
|
||||
)
|
||||
indexes.bobReply = sc.replies[bob].length - 1
|
||||
await sc.reply(
|
||||
alice,
|
||||
sc.posts[alice][indexes.aliceRoot].ref,
|
||||
sc.replies[bob][indexes.bobReply].ref,
|
||||
'Reply reply',
|
||||
)
|
||||
indexes.aliceReplyReply = sc.replies[alice].length - 1
|
||||
|
||||
await network.processAll()
|
||||
|
||||
const thread1 = await agent.api.app.bsky.feed.getPostThread(
|
||||
{ uri: sc.posts[alice][indexes.aliceRoot].ref.uriStr },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
expect(forSnapshot(thread1.data.thread)).toMatchSnapshot()
|
||||
|
||||
await sc.deletePost(bob, sc.replies[bob][indexes.bobReply].ref.uri)
|
||||
await network.processAll()
|
||||
|
||||
const thread2 = await agent.api.app.bsky.feed.getPostThread(
|
||||
{ uri: sc.posts[alice][indexes.aliceRoot].ref.uriStr },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
expect(forSnapshot(thread2.data.thread)).toMatchSnapshot()
|
||||
|
||||
const thread3 = await agent.api.app.bsky.feed.getPostThread(
|
||||
{ uri: sc.replies[alice][indexes.aliceReplyReply].ref.uriStr },
|
||||
{ headers: sc.getHeaders(bob) },
|
||||
)
|
||||
expect(forSnapshot(thread3.data.thread)).toMatchSnapshot()
|
||||
})
|
||||
})
|
@ -1,162 +0,0 @@
|
||||
import AtpAgent from '@atproto/api'
|
||||
import { TestNetwork } from '@atproto/dev-env'
|
||||
import { FeedViewPost } from '../../src/lexicon/types/app/bsky/feed/defs'
|
||||
import { forSnapshot, getOriginator, paginateAll } from '../_util'
|
||||
import { SeedClient } from '../seeds/client'
|
||||
import basicSeed from '../seeds/basic'
|
||||
import { FeedAlgorithm } from '../../src/app-view/api/app/bsky/util/feed'
|
||||
|
||||
describe('timeline proxy views', () => {
|
||||
let network: TestNetwork
|
||||
let agent: AtpAgent
|
||||
let sc: SeedClient
|
||||
|
||||
// account dids, for convenience
|
||||
let alice: string
|
||||
let bob: string
|
||||
let carol: string
|
||||
let dan: string
|
||||
|
||||
beforeAll(async () => {
|
||||
network = await TestNetwork.create({
|
||||
dbPostgresSchema: 'proxy_timeline',
|
||||
})
|
||||
agent = network.pds.getClient()
|
||||
sc = new SeedClient(agent)
|
||||
await basicSeed(sc)
|
||||
alice = sc.dids.alice
|
||||
bob = sc.dids.bob
|
||||
carol = sc.dids.carol
|
||||
dan = sc.dids.dan
|
||||
await network.processAll()
|
||||
await network.pds.ctx.labeler.processAll()
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await network.close()
|
||||
})
|
||||
|
||||
it("fetches authenticated user's home feed w/ reverse-chronological algorithm", async () => {
|
||||
const expectOriginatorFollowedBy = (did) => (item: FeedViewPost) => {
|
||||
const originator = getOriginator(item)
|
||||
// The user expects to see posts & reposts from themselves and follows
|
||||
if (did !== originator) {
|
||||
expect(sc.follows[did]).toHaveProperty(originator)
|
||||
}
|
||||
}
|
||||
|
||||
const aliceTL = await agent.api.app.bsky.feed.getTimeline(
|
||||
{ algorithm: FeedAlgorithm.ReverseChronological },
|
||||
{
|
||||
headers: sc.getHeaders(alice),
|
||||
},
|
||||
)
|
||||
|
||||
expect(forSnapshot(aliceTL.data.feed)).toMatchSnapshot()
|
||||
aliceTL.data.feed.forEach(expectOriginatorFollowedBy(alice))
|
||||
|
||||
const bobTL = await agent.api.app.bsky.feed.getTimeline(
|
||||
{ algorithm: FeedAlgorithm.ReverseChronological },
|
||||
{
|
||||
headers: sc.getHeaders(bob),
|
||||
},
|
||||
)
|
||||
|
||||
expect(forSnapshot(bobTL.data.feed)).toMatchSnapshot()
|
||||
bobTL.data.feed.forEach(expectOriginatorFollowedBy(bob))
|
||||
|
||||
const carolTL = await agent.api.app.bsky.feed.getTimeline(
|
||||
{ algorithm: FeedAlgorithm.ReverseChronological },
|
||||
{
|
||||
headers: sc.getHeaders(carol),
|
||||
},
|
||||
)
|
||||
|
||||
expect(forSnapshot(carolTL.data.feed)).toMatchSnapshot()
|
||||
carolTL.data.feed.forEach(expectOriginatorFollowedBy(carol))
|
||||
|
||||
const danTL = await agent.api.app.bsky.feed.getTimeline(
|
||||
{ algorithm: FeedAlgorithm.ReverseChronological },
|
||||
{
|
||||
headers: sc.getHeaders(dan),
|
||||
},
|
||||
)
|
||||
|
||||
expect(forSnapshot(danTL.data.feed)).toMatchSnapshot()
|
||||
danTL.data.feed.forEach(expectOriginatorFollowedBy(dan))
|
||||
})
|
||||
|
||||
it("fetches authenticated user's home feed w/ default algorithm", async () => {
|
||||
const defaultTL = await agent.api.app.bsky.feed.getTimeline(
|
||||
{},
|
||||
{
|
||||
headers: sc.getHeaders(alice),
|
||||
},
|
||||
)
|
||||
const reverseChronologicalTL = await agent.api.app.bsky.feed.getTimeline(
|
||||
{ algorithm: FeedAlgorithm.ReverseChronological },
|
||||
{
|
||||
headers: sc.getHeaders(alice),
|
||||
},
|
||||
)
|
||||
expect(defaultTL.data.feed).toEqual(reverseChronologicalTL.data.feed)
|
||||
})
|
||||
|
||||
it('omits posts and reposts of muted authors.', async () => {
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: bob },
|
||||
{ headers: sc.getHeaders(alice), encoding: 'application/json' },
|
||||
)
|
||||
await agent.api.app.bsky.graph.muteActor(
|
||||
{ actor: carol },
|
||||
{ headers: sc.getHeaders(alice), encoding: 'application/json' },
|
||||
)
|
||||
|
||||
const aliceTL = await agent.api.app.bsky.feed.getTimeline(
|
||||
{ algorithm: FeedAlgorithm.ReverseChronological },
|
||||
{ headers: sc.getHeaders(alice) },
|
||||
)
|
||||
|
||||
expect(forSnapshot(aliceTL.data.feed)).toMatchSnapshot()
|
||||
|
||||
// Cleanup
|
||||
await agent.api.app.bsky.graph.unmuteActor(
|
||||
{ actor: bob },
|
||||
{ encoding: 'application/json', headers: sc.getHeaders(alice) },
|
||||
)
|
||||
await agent.api.app.bsky.graph.unmuteActor(
|
||||
{ actor: carol },
|
||||
{ encoding: 'application/json', headers: sc.getHeaders(alice) },
|
||||
)
|
||||
})
|
||||
|
||||
it('paginates reverse-chronological feed', async () => {
|
||||
const results = (results) => results.flatMap((res) => res.feed)
|
||||
const paginator = async (cursor?: string) => {
|
||||
const res = await agent.api.app.bsky.feed.getTimeline(
|
||||
{
|
||||
algorithm: FeedAlgorithm.ReverseChronological,
|
||||
cursor,
|
||||
limit: 4,
|
||||
},
|
||||
{ headers: sc.getHeaders(carol) },
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
const paginatedAll = await paginateAll(paginator)
|
||||
paginatedAll.forEach((res) =>
|
||||
expect(res.feed.length).toBeLessThanOrEqual(4),
|
||||
)
|
||||
|
||||
const full = await agent.api.app.bsky.feed.getTimeline(
|
||||
{
|
||||
algorithm: FeedAlgorithm.ReverseChronological,
|
||||
},
|
||||
{ headers: sc.getHeaders(carol) },
|
||||
)
|
||||
|
||||
expect(full.data.feed.length).toEqual(7)
|
||||
expect(results(paginatedAll)).toEqual(results([full.data]))
|
||||
})
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user