01a0e8d5 - Let moderators edit shop notes and mark shop pins - #326
Draft
TaprootFreakAI wants to merge 19 commits into
Draft
TaprootFreakAI wants to merge 19 commits into
TaprootFreakAI wants to merge 19 commits into
Conversation
TaprootFreakAI
force-pushed
the
feat/01a0e8d5-shop-note-edit
branch
from
September 28, 2026 18:51
975305f to
938ebf9
Compare
Collaborator
Author
|
EN: DE: DetailsQuality and logic review on 626c1ae reported no findings. The operator waived the additional review lane for this pull request. The test check on that commit succeeded, and the pull request merges cleanly onto develop. |
TaprootFreakAI
marked this pull request as ready for review
September 28, 2026 21:30
TaprootFreakAI
marked this pull request as draft
September 29, 2026 08:05
TaprootFreakAI
force-pushed
the
feat/01a0e8d5-shop-note-edit
branch
4 times, most recently
from
September 30, 2026 06:34
005988d to
9fbb0b5
Compare
Staff at moderator rank or higher can replace the text of a live top-level shop note at any time. Place and shop-account changes are recorded in the same history. The signed Nostr event stays as published.
A new top-level shop note can name a 21.gifts user. The first assignment is not edit history.
A moderator can clear or replace the photos. The video, the sats, and the published event stay as they are.
The places list says which notes are shops. Pins that are not shops stay without the pencil.
A text value that happens to be JSON stays a string. The contract lists the new shop routes.
The schema note no longer says the unwrap block is last.
A failed extra insert no longer clears the gallery first.
Saving the same shop words without #21GiftsShop restores the tag and writes no history row. The existing test only sent the tag already in place.
A bad id is 404, not 400. The test name said 400 and never checked the error text.
Postgres removes edit rows by cascading from the note. The schema test named the table and never locked that rule.
A missing note is not found before a shop name is looked up. Create, photos, and history say the same.
…ad new stills after the write.
TaprootFreakAI
force-pushed
the
feat/01a0e8d5-shop-note-edit
branch
from
September 30, 2026 07:40
9fbb0b5 to
0f1c82a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EN:
Moderators can change a live shop note at any time: the text, the place, the linked account, and the stills.
The places list says which pins are shop notes, so the map shows the pencil only there.
A real change of text, place, or account is stored with who did it and when, while replacing photos does not write a history row and does not replace the signed Nostr event.
Sunday still refuses those writes, stills can be cleared, and a video on the note stays.
DE:
Moderatoren können einen offenen Shop-Eintrag jederzeit ändern: den Text, den Ort, das verknüpfte Konto und die Standbilder.
Die Ortsliste sagt, welche Pins Shop-Einträge sind, damit die Karte den Bleistift nur dort zeigt.
Eine echte Änderung von Text, Ort oder Konto wird mit Person und Zeitpunkt gespeichert, während neue Bilder keine Historie schreiben und das signierte Nostr-Event nicht ersetzen.
Am Sonntag bleiben diese Schreibvorgänge gesperrt, Standbilder können entfernt werden, und ein Video am Eintrag bleibt.
Details
PATCH /messages/:id/textreplaces the body of a live top-level#21GiftsShopnote. The shop tag is kept or put back. Replies, hidden notes, and notes that are not shop notes are refused.PATCH /messages/:id/photosreplaces the stills. An empty list clears them. The new stills are written before leftover extras are removed, so a failed extra insert does not clear the gallery first. The write then reads the note again, because one statement cannot see its own update. The video, the sats, the author, and the signed event id stay as they are. This write does not appendmessage_edit.GET /messages/:id/editsreturns{ edits: [{ id, createdAt, field, before, after, actor }] }newest first, including a hidden shop note.fieldistext,place, orshopAccount. A live note that is not a shop note returns 404, the same as a missing note. Place and shop-account saves append a row only when the stored value actually changes. The same account id is not a new assignment when only the username or display name differs.GET /messages/placesincludesshop. It is true when the note text contains the shop tag, and false otherwise. That does not change who may edit.A hard delete drops the edit history of that note and its direct replies in the in-memory store as well. Postgres already removes those rows with the note.
Creating a shop note stores the account first. The one-time place push still runs on that saved note.