FIX: Add ownerId to new comments.
ownerId is now added to new comments. Everything worked correctly before the way I was using and manipulating comments, but when I implemented the unapproved comments with the dashboard, I was filtering by ownerId on each comment rather than by threadId, and they didn't show up because they were all set to null.
Handle null owner in thread.
Fixed crash that resulted from no owner being assigned to a thread. This was a legacy issue from updating the live database as I went without referencing the new owner id's.
OwnerId added to models
To allow for good tenant management. The Comment model itself only needs to have the ownerid as a convenience function for the dashboard, but I could refactor it out to only use thread ownerIds if that seemed better at some point.
Set to local rather than live
This queries the local server rather than the live version now for development.
Beginning to add multi-tenant capabilities.
Basic run through of checking the tenant names against a table with approved tenants. If tenantName is found in that list, then the comment is taken into the database, even if the tenant is not active. This includes migrations to add this to the database.
Fixed javascript not loading thread on first load.
Change tenantName.
Tenant name should be set by the site admin to a certain name. This is an easier way of allowing all subdomains etc to a site to either use the same comment system, or for them to be separate.
Move to SQLite as database for now.
Changed to sqlite. Also removed admin stuff from the regular js file. DB migrations added.
Use ORM for getting admin view of single thread
Was previously fetching all, then the server would cherrypick them itself. That's non idiomatic and a bit weird. Fixed now.
Merge remote-tracking branch 'sourcehut/master'
Comment post validation js. CSS changes
Moved Dashboard to separate js file
Ad hoc generation of threads
Lots of small things in this. There is now a thread table that keeps the thread ids for each page referenced by the host and path of the individual page. I need to work on having it deduplicate threads if a subdomain is different.
Better CORS permissions. Better API usage from javascript.
Now uses a hidden value in the form to pass the threadId. This can/should be set at generation of page. I will have a little patch with piaine to make it work for my own sites.
Styling
Working on stylesheets for this. Also fixed a mistake where it was looking for the wrong value name for the approved bool. This is fixed, and now comments are shown in the admin dashboard with approved status.
First look at external thread views
Basic javascript and CSS to draw down a thread from the API. The thread id is served as an argument from the page so the question is do I make a function in the API that returns the thread id for a specific page or include the page as a const when I create the page statically.
First look at an admin dashboard.
DTO, Approval, and some Admin
First commit.
Basic creation and reading of comments with threads.