Skip to content

Commit 373d900

Browse files
chore(client): minor changes
1 parent 64b10ec commit 373d900

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

packages/client/src/agent/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Video } from '~/video';
1414
import { Client } from './client';
1515

1616
export class Agent {
17-
private client: Client<Queries>;
17+
client: Client<Queries>;
1818

1919
constructor(private handler: CredentialManager) {
2020
// Initialize the client

packages/client/src/post/post.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export class Post {
1818
* Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.
1919
*/
2020
async threads(
21-
params: AppBskyFeedGetPostThread.Params,
21+
params: Omit<AppBskyFeedGetPostThread.Params, 'uri'> = {},
2222
options: RPCOptions = {},
2323
) {
2424
const res = await this.client.get('app.bsky.feed.getPostThread', {
25-
params,
25+
params: { uri: this.uri, ...params },
2626
...options,
2727
});
2828

@@ -32,10 +32,13 @@ export class Post {
3232
/**
3333
* Get like records which reference a subject (by AT-URI and CID).
3434
*/
35-
likes(params: AppBskyFeedGetLikes.Params, options: RPCOptions = {}) {
35+
likes(
36+
params: Omit<AppBskyFeedGetLikes.Params, 'uri'> = {},
37+
options: RPCOptions = {},
38+
) {
3639
return Paginator.init(async (cursor) => {
3740
const res = await this.client.get('app.bsky.feed.getLikes', {
38-
params: { cursor, ...params },
41+
params: { cursor, uri: this.uri, ...params },
3942
...options,
4043
});
4144

@@ -46,10 +49,13 @@ export class Post {
4649
/**
4750
* Get a list of quotes for a given post.
4851
*/
49-
quotes(params: AppBskyFeedGetQuotes.Params, options: RPCOptions = {}) {
52+
quotes(
53+
params: Omit<AppBskyFeedGetQuotes.Params, 'uri'> = {},
54+
options: RPCOptions = {},
55+
) {
5056
return Paginator.init(async (cursor) => {
5157
const res = await this.client.get('app.bsky.feed.getQuotes', {
52-
params: { cursor, ...params },
58+
params: { cursor, uri: this.uri, ...params },
5359
...options,
5460
});
5561

@@ -61,12 +67,12 @@ export class Post {
6167
* Get a list of reposts for a given post.
6268
*/
6369
repostedBy(
64-
params: AppBskyFeedGetRepostedBy.Params,
70+
params: Omit<AppBskyFeedGetRepostedBy.Params, 'uri'> = {},
6571
options: RPCOptions = {},
6672
) {
6773
return Paginator.init(async (cursor) => {
6874
const res = await this.client.get('app.bsky.feed.getRepostedBy', {
69-
params: { cursor, ...params },
75+
params: { cursor, uri: this.uri, ...params },
7076
...options,
7177
});
7278

0 commit comments

Comments
 (0)