working part of #9998 (#10114)
working part of #9998 (#10114)

Co-authored-by: zeripath <6a547fdd28db89120bdd70d4af1f9ba672ccd43a@cantab.net>

go-gitea/gitea,vdbt/gitea,sapk-fork/gitea,cez81/gitea,vCaesar/gitea,lafriks/gitea,cez81/gitea,sapk-fork/gitea,go-gitea/gitea,lafriks/gitea,vdbt/gitea,lafriks/gitea,go-gitea/gitea,sapk-fork/gitea,sapk-fork/gitea,cez81/gitea,vCaesar/gitea