~sircmpwn/lists.sr.ht

schema.sql: add missing subscription_request table

This table was added in Alembic migration 49616d9375c2.
Upgrade core-go
Reduce scope of user_type
go.mod: upgrade core-go
Remove last bits of server-wide rejected mimetypes
api: fix mimetypes list processing
Let list admins configure rejection of HTML parts

Currently, the rejection of mails that contain a HTML part is coded into
the config. There was a previous attempt to move this into the list
settings, but it was not quite complete.

This commit puts list admins into full control over whether they want
their lists to accept mails with HTML parts, with one exception: we will
always require that a text/plain part is _also_ present, because
otherwise the UI would not know what to do with the mail.

The following is covered:

* Make sure the current value from the config is added to every lists'
  rejected_mimetypes, unless already present - for the main sr.ht
  instance, this is 'text/html'
* Stop using the value from the config in listssrht-lmtp (and drop it
  from the example config)
* Fix the acceptance logic in listssrht-lmtp
go.mod: upgrade core-go
Convert user_type to pg enum
Reduce setup.py to a stub

All configuration is now in pyproject.toml, all tooling set up to use
it. The stub remains (for now) to execute the call to `make`, as such
calls are not supported by pyproject.toml.
process: fix dupe Content-Type header
Use format=flowed for automatic answer e-mails

Signed-off-by: Max Schillinger <max@mxsr.de>
Drop oauth_revocation_token from schema
Preparations for PEP440 support

Currrently, builds for patches are broken because the version numbers
generated for them are not valid according to PEP 440 [1].

This has to be solved in several steps, in coordination with the
packaging code. Procedure will be the same as for core.sr.ht:

https://git.sr.ht/~sircmpwn/core.sr.ht/commit/57ee3427

The only difference is that the extra build step (running `make`) will
remain in `setup.py` (as there is no generic mechanism for this in
`pyproject.toml`). This just means the build process will still always
have to be performed with setuptools as backend.

[1] https://peps.python.org/pep-0440
graphql: suggest using hut utility instead of curl in default query

`hut` utility is much more approachable for a newbie, because it
deals with all issues of authentication for an user.

Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
patches.py: catch UnicodeDecodeError in feedback view
lists.sr.ht-process: unsubscribe by email, too

In some circumstances, when a user subscribed to a list before creating
an account for the same email address, it can be impossible for the user
to unsubscribe from a list, because the unsubscribe code path only
checks for subscriptions for the user's ID, not the user's email.

This commit makes the unsubscribe code path look for subscriptions for
the user's email as well, if none were found for the ID. While this does
not fix the root cause (doing so is a bit more involved), it does allow
users who are in this situation to successfully unsubscribe.
API: use UnixMicro for mailing list iterator
Upgrade to Alpine 3.20
Next