Skip to content

Commit

Permalink
Update reason type in feed.ts (bluesky-social#749)
Browse files Browse the repository at this point in the history
* Update feed.ts

Missed a spot when refactoring feed definitions.

* Update outdated references in test files.
  • Loading branch information
christiandeange authored Apr 3, 2023
1 parent 3c3569d commit 778b441
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/pds/src/app-view/api/app/bsky/util/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const composeFeed = async (
if (post && originator) {
let reasonType: string | undefined
if (row.type === 'repost') {
reasonType = 'app.bsky.feed.feedViewPost#reasonRepost'
reasonType = 'app.bsky.feed.defs#reasonRepost'
}
const replyParent = row.replyParent
? feedService.formatPostView(row.replyParent, actors, posts, embeds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Array [
"viewer": Object {},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(1)",
"handle": "dan.test",
Expand Down Expand Up @@ -359,7 +359,7 @@ Array [
"viewer": Object {},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(2)",
"handle": "carol.test",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ Array [
},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(2)",
"handle": "carol.test",
Expand Down Expand Up @@ -867,7 +867,7 @@ Array [
},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(1)",
"handle": "dan.test",
Expand Down
14 changes: 7 additions & 7 deletions packages/pds/tests/views/__snapshots__/timeline.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ Array [
"viewer": Object {},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(1)",
"handle": "dan.test",
Expand Down Expand Up @@ -759,7 +759,7 @@ Array [
"viewer": Object {},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(1)",
"handle": "dan.test",
Expand Down Expand Up @@ -919,7 +919,7 @@ Array [
"viewer": Object {},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(2)",
"handle": "carol.test",
Expand Down Expand Up @@ -1915,7 +1915,7 @@ Array [
"viewer": Object {},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(2)",
"handle": "carol.test",
Expand Down Expand Up @@ -2758,7 +2758,7 @@ Array [
},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(2)",
"handle": "carol.test",
Expand Down Expand Up @@ -3312,7 +3312,7 @@ Array [
},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(1)",
"handle": "dan.test",
Expand Down Expand Up @@ -3690,7 +3690,7 @@ Array [
"viewer": Object {},
},
"reason": Object {
"$type": "app.bsky.feed.feedViewPost#reasonRepost",
"$type": "app.bsky.feed.defs#reasonRepost",
"by": Object {
"did": "user(1)",
"handle": "dan.test",
Expand Down

0 comments on commit 778b441

Please sign in to comment.