| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
This is an operation that atomically adds or updates a webmention cite
attached to a post. This is used so a database backend can optimize
for it (for example, using a transaction or shifting the JSON
modification operation to the database)
|
| |
|
|
|
|
|
| |
Untested, but will be useful when testing Webmentions in the
end-to-end test.
|
|
|
|
|
| |
Now the postgres schemas are completely independent of each
other. This took a while to figure out!
|
| |
|
|
|
|
|
|
|
| |
This allows using tree-structured concurrency to keep background tasks
in check and allow them to finish running before shutting down β a
necessary prerequisite for shutdown-on-idle. (A background task may
take a bit too long to complete, and we may need to wait for it.)
|
| |
|
|
|
|
|
|
| |
Total crash-safety. Yank the power cord all you want, your data is
going to be safe and sound. (Unless your drive controller lies to you
about flushing its caches)
|
|
|
|
|
|
| |
Apparently this requires a helper crate to make Hyper aware of UNIX
sockets. That's fine. That's not a priority for now β but the code is
practically there.
|
|
|
|
|
|
|
|
| |
I would also love to be able to listen on Unix stream sockets, but
that would require some additional support that can thankfully be just
introduced later.
(It also requires a second loop over the file descriptor array)
|
|
|
|
|
|
|
|
|
| |
Axum got some breaking changes and gained some nice features β
however, features come later, breaking changes come first.
Perhaps it would be nice to actually construct a State with all of my
stuff, and then make functions generic over that. Could reduce the
amount of generic stuff I am producing... maybe.
|
| |
|
|
|
|
|
|
|
| |
The trait itself seems basic enough that it could be reused
elsewhere. Better to keep it in a separate crate.
`-util` is a dumping ground for various things anyway.
|
|
|
|
|
|
|
|
| |
This requires the background task to be cancellation-safe, as it is
dropped after receiving a cancellation event.
Perhaps in the future there will be a supervisor version that may
forward the cancellation to the task itself.
|
|
|
|
|
|
| |
This also involves a crude "async drop" implementation that fires a
future incrementing an attempt if a Job has been dropped without
marking it as done.
|
| |
|
| |
|
|
|
|
|
| |
It's generic enough to be used for anything, but for now it's only
gonna be used for webmentions.
|
| |
|
|
|
|
|
| |
This allows to use the helper on production websites that do security
checks on redirect URIs, as the URI is now properly declared.
|
|
|
|
|
|
|
| |
A single giga-commit that took me weeks to produce. I know, this is
not exactly the best thing ever β but I wanted to experiment first
before "committing" to the implementation, so that I would produce the
best solution.
|
|
|
|
|
|
| |
This gives me much more readable traces. JSON logging is still
superior in production, where logs are stored in systemd-journald and
preferably need to be self-contained lines.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This one manages to avoid extraneous allocations as much as possible,
by deconstructing the update into pieces and using a mutable reference
taken directly from the hashmap in which the posts are stored.
Now if only this hashmap were to be serialized on Drop, we could even
have persistence in the database and therefore gain another backend
that requires no dependencies to run, just like FileStorage, but
avoids extraneous file access (or maybe shunts it into the
background?)
|
|
|
|
|
| |
This was the job of the database before. Now the frontend should do it
before passing the post to the templates.
|
|
|
|
|
|
|
|
|
|
|
|
| |
`filter_post` is now out of here and moved into the frontend. This
kind of non-intrusive filtering can be done on the frontend, and the
database need not concern itself with this.
It can still be done as an optimisation... probably? but the frontend
is going to sanitize things like location in the post by itself now,
so it is not required anymore (and might be harmful, if frontend
starts indicating that there are some hidden fields by replacing them
with placeholders that ask one to log in to view information).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
We insert published time into all objects anyway, and expect feeds to
be ordered by publishing time. We should let databases rely on that
assumption when returning feeds.
|
|
|
|
|
| |
Some database backends may have optimized ways of tracking feed
contents. Others might just use the "children" property directly.
|
|
|
|
|
| |
This allows disregarding http/https comparisons and simplifies some
database designs.
|
|
|
|
|
| |
read_feed_with_cursor allows using an arbitrary string as a cursor,
unlike read_feed_with_limit, which uses last post's UID as a cursor.
|
|
|
|
|
| |
This allows avoiding an unnecessary allocation whenever the error
message is static.
|
|
|
|
|
|
| |
This allows proper separation of backend initialization and Kittybox
construction code. Some boilerplate is still present, but there's much
less of it now thanks to functions being generic.
|
|
|
|
| |
should've been a LazyLock tho
|
|
|
|
|
|
| |
- cleaner format!()
- syndication links
- broke up a long line
|
|
|
|
| |
Optional at first. Onboarding UI not yet exposed.
|
|
|
|
| |
This allows much for a cleaner and idiomatic settings interface.
|
| |
|
| |
|
|
|
|
|
| |
Bytes buffers are already reference-counted and cheaply clonable;
there is no need to wrap them further.
|
| |
|
|
|
|
|
|
|
| |
For now it is not yet exposed on the frontend, but that is merely a
matter of time.
TODO possibly remove the legacy methods, since they're obsoleted
|
|
|
|
|
|
|
|
|
|
|
|
| |
It makes more sense to keep CSS near the templates, and the
client-side JavaScript code too, since it depends on the DOM structure
to work. Additionally, the overhead of `include_dir!()` is almost
completely mitigated by the fact that this is a separate crate that
isn't recompiled often.
The linking stage, however, is still expected to take a little bit
long. But I doubt it'd be longer than what it was before, since it's
the same exact files that get linked into the app.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: this requires a reindex of the media database. For the default
CAS backend, use the following:
```bash
for i in */*/*/*/*.json; do
etag="$(echo $i | sed -e 's/\///g' -e 's/\.json$//')";
mv "$i" "$i.bak"
cat "$i.bak" | jq '. + { "etag": '\""$etag"\"'}' > "$i"
rm "$i.bak"
done
```
This change is backwards compatible, but caching headers won't be
emitted without etags present in the metadata.
Actual etags are backend-specific and might differ from backend to
backend.
|
|
|
|
|
|
| |
I don't know how worthwhile that was, given that LibreJS developers
themselves don't care to properly declare licenses on the Bazaar
frontend they use to host the extension's source code on the Web π€‘
|
|
|
|
|
| |
This is a naive implementation that doesn't have some security
checks. It's ok tho, should work fine... can refine it later
|