Merged
Conversation
The 10-second polling was replacing innerHTML and resetting the scroll to top. Now refresh() saves and restores feed.scrollTop. Only scrolls to top explicitly after posting a new status.
GetProfile returns a pointer to the map entry. Callers were mutating
profile.Status before calling UpdateProfile — but UpdateProfile reads
the 'old' status from the same map, which was already the new value.
Result: new status pushed to history AND set as current → duplicate
on screen. History also doubled on each save because existing.History
and profile.History were the same slice.
Fix: new UpdateStatus(userID, newStatus) helper passes a fresh
&Profile{} to UpdateProfile. Since it's not the map pointer, the
existing lookup correctly reads the old status. All three call sites
(StatusHandler, profile page POST, PostSystemStatus) now use
UpdateStatus instead of mutating the GetProfile pointer.
Three fixes for ongoing spam: 1. Profile page POST (/@user) was completely unguarded — no CanPost, no CheckPostRate, no wallet charge, no moderation. Same gates as StatusHandler now applied: verification, rate limit, 1 credit charge, async moderation with auto-ban. 2. CanPost now requires 24-hour account age for ALL post types (blog, social, status, apps, work). Previously only required email verification. New accounts must wait 24 hours AND verify their email. PostBlockReason shows the remaining time. 3. Moderation prompt tightened — explicitly flags vulgar, crude, sexual, and obscene content as HARMFUL. Added 'when in doubt, flag it' instruction. 'Big fat balls' will now be caught.
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.
No description provided.