Repository navigation
Conversation
…o handle reblooming of existing blooms
…and consistency
LonMcGregor
left a comment
There was a problem hiding this comment.
Did you commit all the changes you intended here? When I try to test I get an error: "apiService.rebloom is not a function"
| # Get the current user's own blooms | ||
| own_blooms = blooms.get_blooms_for_user(current_user.username, limit=50) | ||
|
|
||
| # <-- DELETE from here down to the return line --> |
There was a problem hiding this comment.
Thanks for flagging this. I’ve committed the missing rebloom changes, including exposing rebloom on apiService and registering the backend route. I also removed the stray “DELETE…” comment; the timeline code below it is required. Please apply the reblooms database migration before testing against an existing database. @LonMcGregor
LonMcGregor
left a comment
There was a problem hiding this comment.
Good work, the rebloom functionality works well now. I have some questions about your submitted PR.
There was a problem hiding this comment.
Did you mean to commit this file? I can't read the language. If it's just for your own use, and not intended for colleagues to read, you don't need to commit it.
| username = %(sender_username)s | ||
| {before_clause} | ||
| ORDER BY send_timestamp DESC | ||
| f"""SELECT id, sender_username, content, sent_timestamp, |
There was a problem hiding this comment.
This query looks very complex. I have a few questions:
- Can you talk me through what it is doing at each stage?
- Do you think there are any efficiency considerations with your current approach?
Learners, PR Template
Self checklist
Task code
CYF-1171
Changelist
Added a reblooms table storing which user re-bloomed which bloom and when.
Added an authenticated POST /rebloom/ endpoint.
Added a unique constraint on (bloom_id, user_id) so a user can't re-bloom the same bloom twice.
Added rebloom to the frontend apiService.
Added a Re-bloom button to blooms in the timeline, hidden when logged out and disabled while the request runs.
Updated the home timeline to include re-blooms by the current user and the people they follow.
Re-bloomed blooms keep their original author, content and original timestamp.
The timeline uses the re-bloom timestamp to position a re-bloom in the feed.
Added a banner showing who re-bloomed the original bloom, plus a purple border so re-blooms look different from normal blooms.
Added a re-bloom count, shown only when a bloom has been re-bloomed at least once.