Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quote aggs, list quotes #2658

Merged
merged 26 commits into from
Aug 21, 2024
Merged

quote aggs, list quotes #2658

merged 26 commits into from
Aug 21, 2024

Conversation

haileyok
Copy link
Contributor

No description provided.

rework schema

rework schema

add getPostQuotes to api

use posts

use posts

codegen

use items instead of quotes

codegen

add getPostQuotes

add quoteCount to response

update lexicon for postview

increment post ags

add quote to post aggs

add quote interface

oops

add quote table migration
@mozzius mozzius force-pushed the hailey/quote-view branch from fc133e1 to d468f06 Compare August 1, 2024 10:00
haileyok and others added 3 commits August 1, 2024 10:09
@haileyok haileyok force-pushed the hailey/quote-view branch from 0d2e2e0 to b75f08d Compare August 1, 2024 20:55
@@ -304,6 +339,7 @@ const deleteFn = async (
.executeTakeFirst(),
db.deleteFrom('feed_item').where('postUri', '=', uriStr).executeTakeFirst(),
])
await db.deleteFrom('quote').where('subject', '=', uriStr).execute()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the right place to stick this, deleting all the quotes for the post once we delete it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's another one of these below. I think we can nix this one.

Suggested change
await db.deleteFrom('quote').where('subject', '=', uriStr).execute()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay looks like w/o this the test fails. let me actually pull down the code and look while i fix up that test.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh you know, I think I had it wrong. The quote gets deleted if either the post or the quoted post get deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yep. added this line back now.

@haileyok
Copy link
Contributor Author

haileyok commented Aug 1, 2024

Having problems getting indexing.test.ts to pass, maybe someone has a hint as to why :(

@haileyok haileyok marked this pull request as ready for review August 1, 2024 20:58
@seboslaw
Copy link

@haileyok I'm wondering (and I'm probably not seeing it in the code) but shouldn't there also be an optional quoteID in the viewer? That way we can display that the user has already quoted a post.

@haileyok
Copy link
Contributor Author

@seboslaw I'm thinking that we shouldn't care about the user has already quoted a post or not? If the user makes more than one quote each should show up both in listing and in the quote count. From what I could tell this is also how Twitter works (though maybe there's more to it?)

@seboslaw
Copy link

@haileyok I just checked. You're right. Twitter also doesn't show it (which I thought it did) and since you can quote multiple times - like you said - it makes no sense to indicate a 'made quote'. 👍

haileyok and others added 6 commits August 16, 2024 12:04
* origin/main:
  Fix calls from pds containing content-type but no body (#2725)
  Version packages (#2712)
  Service auth method binding (lxm) (#2663)
  Fix getActorLikes documentation to reflect auth required (#2593)
  exact matches always show profile regardless of block status (#2653)
Co-authored-by: devin ivy <devinivy@gmail.com>
@estrattonbailey estrattonbailey merged commit 2a0c088 into main Aug 21, 2024
10 checks passed
@estrattonbailey estrattonbailey deleted the hailey/quote-view branch August 21, 2024 17:33
@github-actions github-actions bot mentioned this pull request Aug 21, 2024
estrattonbailey added a commit that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants