Commit Graph

65 Commits

Author SHA1 Message Date
Ben Visness 3a93aa93e9 Seed users (and rework a lot of user access to use new helpers) 2022-05-07 13:58:00 -05:00
Ben Visness b46f5d8637 Add bare minimum seed 2022-05-07 11:37:15 -05:00
Ben Visness 1020039ea2 Fix up tests 2022-05-07 09:43:41 -05:00
Ben Visness 0e56f56372 Rename all the db tables 2022-05-07 08:11:05 -05:00
Ben Visness a147cfa325 Rework DB API
This takes advantage of generics, and generally clears up a lot of
inconsistencies and quality-of-life issues.

Start of db rework: clean up, start generics, improve tests

Write some nice aspirational package docs

Rework and document the db API

Tests still pass, at least...now for everything else

Update all callsites of db functions

Finish converting all callsites

Not too bad actually! Centralizing access into the helpers makes a big
difference.

wtf it works
2022-05-06 16:56:13 -05:00
Asaf Gartner 11dd75ad03 Twitch monitoring 2022-03-22 20:07:43 +02:00
Asaf Gartner 8e7c20fffa Removed old project logo url fields 2022-02-13 22:07:09 +02:00
Asaf Gartner d32cd0a849 Removed old user avatar url field from the db 2022-02-13 21:52:29 +02:00
Asaf Gartner f4f439489d Assets for user avatars 2021-12-29 16:38:23 +02:00
Asaf Gartner 950e84d53a Personal project creation 2021-12-02 12:53:36 +02:00
Ben Visness 0cc879df21 Add tags to snippets on timelines 2021-11-11 11:00:46 -08:00
Ben Visness 5256e5c37c Add new tags data model 2021-11-10 10:19:22 -08:00
Ben Visness 5f7dedce93 Implement the down migration for personal projects 2021-11-10 09:53:24 -08:00
Ben Visness a4ad2c5f04 Update data model for personal projects
Also:
- Added a helper for fetching posts with appropriate visibility
- Added personal projects to the project index
2021-11-06 15:25:31 -05:00
Ben Visness 251446d6e4 Do jam showcase stuff 2021-09-24 22:53:00 -05:00
Ben Visness 9c7acd7dbb Add a sort field to subforums 2021-09-23 01:18:45 -05:00
Ben Visness 986a42c1ac Switch to centralized helpers for fetching threads/posts
This includes the ability to "shadowban" new users who have not yet been
approved. We do not have UI for approving these users.

Migrate deserving users to new Approved status

Add post fetching helpers as well

The logic in the thread/post stuff is definitely getting redundant, but
I'm not sure I'm yet ready to try to abstract any of it away.

The next thing to do is probably to update blogs and other places that
fetch threads/posts, and delete the old helpers.

Move forums and blogs fully to new helpers

Use the helpers on the landing page too

that was easy!

Fix up some spots I missed

Check user status and use helpers on the profile page
2021-09-22 23:48:31 -05:00
Asaf Gartner 7063fd5604 Added basic usage tracking for posts. 2021-09-22 22:18:39 +03:00
Ben Visness b2a35c469a Update project last updated fields on new forum/blog posts 2021-09-08 22:44:46 -05:00
Ben Visness 36bb2ce2d5 Put timestamp in avatar filenames to avoid cache problems 2021-09-07 19:55:52 -05:00
Ben Visness f1e2e99663 Don't treat replies to the OP as replies 2021-09-06 16:40:00 -05:00
Ben Visness b53770932d No longer require a migration in seedfile
We don't need to do this any more, since our database backups now
include the migration table. The seedfile command also no longer
requires the user to type a password.

This also prevents the Discord history bot from running when it has no
credentials.
2021-09-05 19:43:49 -05:00
Ben Visness 59f5243839 Prefix things with "public." inside Postgres functions
Boy is this a stupid behavior of Postgres, and one that only really
manifests when restoring data from a backup.
2021-09-05 17:43:34 -05:00
Ben Visness a42973c3cb More server setup stuff I dunno I'm sorry 2021-09-04 16:09:01 -05:00
Asaf Gartner 307a122518 Another attempt at crash mailing 2021-09-04 21:59:03 +03:00
Ben Visness c59b58daf0 Restrict project header links 2021-08-28 08:11:01 -05:00
Ben Visness a655fe96bc Fix up remaining project colors 2021-08-28 07:14:49 -05:00
Ben Visness 67b86720a9 Add user edit form
Add most of the user settings backend

still need to do discord lol

Add the Discord settings

Add avatar uploads
2021-08-27 17:18:02 -05:00
Ben Visness 719c0d230c Delete stuff on message delete
still need to do bulk delete
2021-08-26 18:33:39 -05:00
Ben Visness ec64babdd6 Create snippets! 2021-08-23 19:49:39 -05:00
Asaf Gartner 40ba0d5455 Added unique constraint on onetimetoken 2021-08-17 08:31:48 +03:00
Ben Visness d92bf9a9b8 Add Discord account linking 2021-08-15 23:40:56 -05:00
Ben Visness 38a1188be7 Add Discord integration
Clean up several TODOs

Implement the full disconnect / resume flow

Detect zombied connections and restart

Implement the random delay on reconnect

Implement message sending!!

(with a goofy feedback loop on the echo bot)

Fix the feedback loop in the echo bot

Clean up the Discord gateway code

Many things are methods now to reduce the amount of explicit plumbing.
Connection handling should be a little more robust, and we have an
actual error handling strategy now.

Allow sending multiple Discord messages at once

Delete irrelevant tests

uhh, start rate limiting

Add per-route rate limiting

Add global rate limit handling

Handle context cancellation in Discord REST code

Allow changing buckets per route

Add the showcase rejection bot

Add library bot
2021-08-15 20:21:04 -05:00
Asaf Gartner 660f65ba95 Registration flow and email 2021-08-08 23:05:52 +03:00
Ben Visness 038ee7e90e Add permission check to the New Post button 2021-08-02 22:27:59 -05:00
Ben Visness c3e067fa44 Add blog indexes 2021-08-02 20:52:46 -05:00
Ben Visness bde7c576e3 Don't crash while listing migrations 2021-07-30 21:36:37 -05:00
Ben Visness b0f75675c8 Implement blog posts 2021-07-30 14:59:48 -05:00
Ben Visness 958aeb45e4 Add back the ability to mark everything on the site as unread 2021-07-29 23:48:30 -05:00
Ben Visness 8ecb4a7173 Rework the category/thread data model
Threads can stand alone now. Threads can be attached to resources
directly without requiring a category. In addition, a lot of wiki stuff
and library discussion stuff was deleted because we're not gonna port
it.
2021-07-29 22:49:24 -05:00
Asaf Gartner b41a556fcd Merge branch 'master' of gitssh.handmade.network:hmn/hmn 2021-07-23 06:22:57 +03:00
Asaf Gartner a46fd988f5 Podcasts 2021-07-23 06:09:46 +03:00
Ben Visness e9ba9b3dde Add permission check on post editing 2021-07-21 21:16:10 -05:00
Ben Visness 1ccf715c2d Add an explicit post reply feature 2021-07-19 22:07:15 -05:00
Ben Visness c1785d79a4 Get forum post creation working 2021-07-04 17:48:08 -05:00
Ben Visness de0b7a08fb Clean up lots of old post fields 2021-07-04 16:24:48 -05:00
Ben Visness 86e228d845 WIP broken schema changes for forum editing 2021-07-04 15:32:07 -05:00
Ben Visness 00b0383030 Start forum editing experience, including bbcode parser 2021-07-04 15:31:37 -05:00
Ben Visness c8231750aa Make some project fields not null 2021-05-05 23:04:58 -05:00
Ben Visness 71a46ba5a1 Get forum threads mostly implemented
Still several TODOs in the handler and templates
2021-05-03 20:59:45 -05:00