mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-06 19:25:59 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4ba02218f | ||
|
|
d13609c372 | ||
|
|
58fb269450 | ||
|
|
303e52b476 | ||
|
|
868894f500 | ||
|
|
67d49b461f | ||
|
|
f89ee5a370 | ||
|
|
2afea56e56 | ||
|
|
a5387b64af | ||
|
|
0b178fc791 | ||
|
|
5d27a91e90 | ||
|
|
e2016a2ab4 | ||
|
|
924c7f5b18 | ||
|
|
22e46194ab | ||
|
|
ffdb2b6900 | ||
|
|
a7b870c397 | ||
|
|
b48eb28fc2 | ||
|
|
dc9c82aa4e |
9
.github/workflows/docker.yaml
vendored
9
.github/workflows/docker.yaml
vendored
@@ -7,19 +7,20 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "Dockerfile"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref }}
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
base:
|
||||
name: Test base image build
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: arc-runner-set
|
||||
if: github.event_name == 'pull_request'
|
||||
steps:
|
||||
# Configure build environment
|
||||
@@ -40,7 +41,7 @@ jobs:
|
||||
cache-to: type=gha,scope=buildx-base-multi-arch,mode=max
|
||||
|
||||
publish:
|
||||
runs-on: self-hosted
|
||||
runs-on: arc-runner-set
|
||||
if: github.event_name != 'pull_request'
|
||||
name: Publish Docker images
|
||||
steps:
|
||||
|
||||
60
.github/workflows/release-please.yml
vendored
Normal file
60
.github/workflows/release-please.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
name: Release Please
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main] # updates/opens the release PR when commits land on main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: release-please
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
name: Release Please
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release_created: ${{ steps.rp.outputs.release_created }}
|
||||
tag_name: ${{ steps.rp.outputs.tag_name }}
|
||||
steps:
|
||||
- id: app-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ secrets.GH_STOAT_RELEASE_APP_ID }}
|
||||
private-key: ${{ secrets.GH_STOAT_RELEASE_APP_PRIVATE_KEY }}
|
||||
- id: rp
|
||||
uses: googleapis/release-please-action@v4
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
config-file: release-please-config.json
|
||||
|
||||
publish-please:
|
||||
name: Publish Please
|
||||
needs: release-please
|
||||
if: needs.release-please.outputs.release_created == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: app-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ secrets.GH_STOAT_RELEASE_APP_ID }}
|
||||
private-key: ${{ secrets.GH_STOAT_RELEASE_APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Send release notification webhook
|
||||
run: |
|
||||
RELEASE_URL="https://github.com/revoltchat/backend/releases/tag/${{ needs.release-please.outputs.tag_name }}"
|
||||
curl -X POST "${{ secrets.STOAT_WEBHOOK_UPDATES_URL }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"content\": \"$RELEASE_URL\"}"
|
||||
|
||||
- name: Publish crates
|
||||
uses: katyo/publish-crates@v2
|
||||
with:
|
||||
registry-token: ${{ secrets.CRATES_IO_PUBLISH_TOKEN }}
|
||||
39
.github/workflows/rust.yaml
vendored
39
.github/workflows/rust.yaml
vendored
@@ -5,8 +5,8 @@ on:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref }}
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
@@ -15,29 +15,28 @@ env:
|
||||
jobs:
|
||||
check:
|
||||
name: Rust project
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: arc-runner-set
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Free up disk space
|
||||
run: |
|
||||
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
|
||||
# Using our own runners for now:
|
||||
# - name: Free up disk space
|
||||
# run: |
|
||||
# sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
|
||||
|
||||
- name: Install latest stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Install cargo-nextest
|
||||
uses: baptiste0928/cargo-install@v1
|
||||
uses: taiki-e/install-action@a58ae9526b2c3acee9ad8e1926b950b7863305d4 # 2.65.16
|
||||
with:
|
||||
crate: cargo-nextest
|
||||
args: --locked
|
||||
tool: cargo-nextest@0.9.119
|
||||
|
||||
- name: Run cargo build
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
run: cargo build
|
||||
|
||||
- name: Run services in background
|
||||
run: |
|
||||
@@ -65,13 +64,13 @@ jobs:
|
||||
|
||||
- name: Wait for API to go up
|
||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||
uses: nev7n/wait_for_response@v1
|
||||
uses: nev7n/wait_for_response@7fef3c1a6e8939d0b09062f14fec50d3c5d15fa1 # v1.0.1
|
||||
with:
|
||||
url: "http://localhost:14702/"
|
||||
|
||||
- name: Checkout API repository
|
||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
with:
|
||||
repository: stoatchat/javascript-client-api
|
||||
path: api
|
||||
@@ -83,10 +82,10 @@ jobs:
|
||||
|
||||
- name: Commit changes
|
||||
if: github.event_name != 'pull_request' && github.ref_name == 'main'
|
||||
uses: EndBug/add-and-commit@v4
|
||||
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
|
||||
with:
|
||||
cwd: "api"
|
||||
add: "*.json"
|
||||
author_name: Revolt CI
|
||||
author_email: revolt-ci@users.noreply.github.com
|
||||
author_name: Stoat CI
|
||||
author_email: stoat-ci@users.noreply.github.com
|
||||
message: "chore: generate OpenAPI specification"
|
||||
|
||||
3
.release-please-manifest.json
Normal file
3
.release-please-manifest.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
".": "0.9.2"
|
||||
}
|
||||
58
CHANGELOG.md
Normal file
58
CHANGELOG.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Changelog
|
||||
|
||||
## [0.9.2](https://github.com/stoatchat/stoatchat/compare/v0.9.1...v0.9.2) (2026-01-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* disable publish for services ([#485](https://github.com/stoatchat/stoatchat/issues/485)) ([d13609c](https://github.com/stoatchat/stoatchat/commit/d13609c37279d6a40445dcd99564e5c3dd03bac1))
|
||||
|
||||
## [0.9.1](https://github.com/stoatchat/stoatchat/compare/v0.9.0...v0.9.1) (2026-01-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** pipeline fixes (marked as fix to force release) ([#483](https://github.com/stoatchat/stoatchat/issues/483)) ([303e52b](https://github.com/stoatchat/stoatchat/commit/303e52b476585eea81c33837f1b01506ce387684))
|
||||
|
||||
## [0.9.0](https://github.com/stoatchat/stoatchat/compare/v0.8.8...v0.9.0) (2026-01-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add id field to role ([#470](https://github.com/stoatchat/stoatchat/issues/470)) ([2afea56](https://github.com/stoatchat/stoatchat/commit/2afea56e56017f02de98e67316b4457568ad5b26))
|
||||
* add ratelimits to gifbox ([1542047](https://github.com/stoatchat/stoatchat/commit/154204742d21cbeff6e2577b00f50b495ea44631))
|
||||
* include groups and dms in fetch mutuals ([caa8607](https://github.com/stoatchat/stoatchat/commit/caa86074680d46223cebc20f41e9c91c41ec825d))
|
||||
* include member payload in ServerMemberJoin event ([480f210](https://github.com/stoatchat/stoatchat/commit/480f210ce85271e13d1dac58a5dae08de108579d))
|
||||
* initial work on tenor gif searching ([b0c977b](https://github.com/stoatchat/stoatchat/commit/b0c977b324b8144c1152589546eb8fec5954c3e7))
|
||||
* make message lexer use unowned string ([1561481](https://github.com/stoatchat/stoatchat/commit/1561481eb4cdc0f385fbf0a81e4950408050e11f))
|
||||
* ready payload field customisation ([db57706](https://github.com/stoatchat/stoatchat/commit/db577067948f13e830b5fb773034e9713a1abaff))
|
||||
* require auth for search ([b5cd5e3](https://github.com/stoatchat/stoatchat/commit/b5cd5e30ef7d5e56e8964fb7c543965fa6bf5a4a))
|
||||
* trending and categories routes ([5885e06](https://github.com/stoatchat/stoatchat/commit/5885e067a627b8fff1c8ce2bf9e852ff8cf3f07a))
|
||||
* voice chats v2 ([#414](https://github.com/stoatchat/stoatchat/issues/414)) ([d567155](https://github.com/stoatchat/stoatchat/commit/d567155f124e4da74115b1a8f810062f7c6559d9))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add license to revolt-parser ([5335124](https://github.com/stoatchat/stoatchat/commit/53351243064cac8d499dd74284be73928fa78a43))
|
||||
* allow for disabling default features ([65fbd36](https://github.com/stoatchat/stoatchat/commit/65fbd3662462aed1333b79e59155fa6377e83fcc))
|
||||
* apple music to use original url instead of metadata url ([bfe4018](https://github.com/stoatchat/stoatchat/commit/bfe4018e436a4075bae780dd4d35a9b58315e12f))
|
||||
* apply uname fix to january and autumn ([8f9015a](https://github.com/stoatchat/stoatchat/commit/8f9015a6ff181d208d9269ab8691bd417d39811a))
|
||||
* **ci:** publish images under stoatchat and remove docker hub ([d65c1a1](https://github.com/stoatchat/stoatchat/commit/d65c1a1ab3bdc7e5684b03f280af77d881661a3d))
|
||||
* correct miniz_oxide in lockfile ([#478](https://github.com/stoatchat/stoatchat/issues/478)) ([5d27a91](https://github.com/stoatchat/stoatchat/commit/5d27a91e901dd2ea3e860aeaed8468db6c5f3214))
|
||||
* correct shebang for try-tag-and-release ([050ba16](https://github.com/stoatchat/stoatchat/commit/050ba16d4adad5d0fb247867aa3e94e3d42bd12d))
|
||||
* correct string_cache in lockfile ([#479](https://github.com/stoatchat/stoatchat/issues/479)) ([0b178fc](https://github.com/stoatchat/stoatchat/commit/0b178fc791583064bf9ca94b1d39b42d021e1d79))
|
||||
* don't remove timeouts when a member leaves a server ([#409](https://github.com/stoatchat/stoatchat/issues/409)) ([e635bc2](https://github.com/stoatchat/stoatchat/commit/e635bc23ec857d648d5705e1a3875d7bc3402b0d))
|
||||
* don't update the same field while trying to remove it ([f4ee35f](https://github.com/stoatchat/stoatchat/commit/f4ee35fb093ca49f0a64ff4b17fd61587df28145)), closes [#392](https://github.com/stoatchat/stoatchat/issues/392)
|
||||
* github webhook incorrect payload and formatting ([#468](https://github.com/stoatchat/stoatchat/issues/468)) ([dc9c82a](https://github.com/stoatchat/stoatchat/commit/dc9c82aa4e9667ea6639256c65ac8de37a24d1f7))
|
||||
* implement Serialize to ClientMessage ([dea0f67](https://github.com/stoatchat/stoatchat/commit/dea0f675dde7a63c7a59b38d469f878b7a8a3af4))
|
||||
* newly created roles should be ranked the lowest ([947eb15](https://github.com/stoatchat/stoatchat/commit/947eb15771ed6785b3dcd16c354c03ded5e4cbe0))
|
||||
* permit empty `remove` array in edit requests ([6ad3da5](https://github.com/stoatchat/stoatchat/commit/6ad3da5f35f989a2e7d8e29718b98374248e76af))
|
||||
* preserve order of replies in message ([#447](https://github.com/stoatchat/stoatchat/issues/447)) ([657a3f0](https://github.com/stoatchat/stoatchat/commit/657a3f08e5d652814bbf0647e089ed9ebb139bbf))
|
||||
* prevent timing out members which have TimeoutMembers permission ([e36fc97](https://github.com/stoatchat/stoatchat/commit/e36fc9738bac0de4f3fcbccba521f1e3754f7ae7))
|
||||
* relax settings name regex ([3a34159](https://github.com/stoatchat/stoatchat/commit/3a3415915f0d0fdce1499d47a2b7fa097f5946ea))
|
||||
* remove authentication tag bytes from attachment download ([32e6600](https://github.com/stoatchat/stoatchat/commit/32e6600272b885c595c094f0bc69459250220dcb))
|
||||
* rename openapi operation ids ([6048587](https://github.com/stoatchat/stoatchat/commit/6048587d348fbca0dc3a9b47690c56df8fece576)), closes [#406](https://github.com/stoatchat/stoatchat/issues/406)
|
||||
* respond with 201 if no body in requests ([#465](https://github.com/stoatchat/stoatchat/issues/465)) ([24fedf8](https://github.com/stoatchat/stoatchat/commit/24fedf8c4d9cd3160bdec97aa451520f8beaa739))
|
||||
* swap to using reqwest for query building ([38dd4d1](https://github.com/stoatchat/stoatchat/commit/38dd4d10797b3e6e397fc219e818f379bdff19f2))
|
||||
* use `trust_cloudflare` config value instead of env var ([cc7a796](https://github.com/stoatchat/stoatchat/commit/cc7a7962a882e1627fcd0bc75858a017415e8cfc))
|
||||
* use our own result types instead of tenors types ([a92152d](https://github.com/stoatchat/stoatchat/commit/a92152d86da136997817e797c7af8e38731cdde8))
|
||||
169
Cargo.lock
generated
169
Cargo.lock
generated
@@ -443,25 +443,22 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "authifier"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1a03b810b342b4c584cdc1cfc40d1ec763b1d653ef4086f7494740f35d9e1f0"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"async-trait",
|
||||
"base32",
|
||||
"base64 0.22.1",
|
||||
"bson",
|
||||
"chrono",
|
||||
"form_urlencoded",
|
||||
"futures",
|
||||
"handlebars",
|
||||
"iso8601-timestamp",
|
||||
"jsonwebtoken",
|
||||
"lazy_static",
|
||||
"lettre",
|
||||
"log",
|
||||
"mime",
|
||||
"mongodb",
|
||||
"nanoid",
|
||||
"oauth2-types",
|
||||
"rand 0.8.5",
|
||||
"regex",
|
||||
"reqwest 0.11.27",
|
||||
@@ -472,9 +469,7 @@ dependencies = [
|
||||
"schemars 0.8.22",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"sha1",
|
||||
"sha2",
|
||||
"totp-lite",
|
||||
"ulid 0.5.0",
|
||||
"validator 0.15.0",
|
||||
@@ -4034,11 +4029,9 @@ checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"js-sys",
|
||||
"pem 3.0.5",
|
||||
"ring",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"simple_asn1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4059,7 +4052,7 @@ dependencies = [
|
||||
"p256 0.13.2",
|
||||
"p384",
|
||||
"rand 0.8.5",
|
||||
"rsa 0.7.2",
|
||||
"rsa",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"spki 0.6.0",
|
||||
@@ -4251,15 +4244,6 @@ dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "language-tags"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.5.0"
|
||||
@@ -4672,47 +4656,6 @@ dependencies = [
|
||||
"tendril",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mas-iana"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0d41af7e8eb3584b648c563a1b97b8f60c7f3dcd7ea0ded525050418d90c5200"
|
||||
dependencies = [
|
||||
"schemars 0.8.22",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mas-jose"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb6a1c99221601a1e9ef284efaa6db5985389c839c299d71d5a4c2933ba88eda"
|
||||
dependencies = [
|
||||
"base64ct",
|
||||
"chrono",
|
||||
"digest",
|
||||
"ecdsa 0.16.9",
|
||||
"elliptic-curve 0.13.8",
|
||||
"generic-array 0.14.7",
|
||||
"hmac",
|
||||
"k256",
|
||||
"mas-iana",
|
||||
"p256 0.13.2",
|
||||
"p384",
|
||||
"rand 0.8.5",
|
||||
"rsa 0.9.9",
|
||||
"schemars 0.8.22",
|
||||
"sec1 0.7.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_with",
|
||||
"sha2",
|
||||
"signature 2.2.0",
|
||||
"thiserror 1.0.69",
|
||||
"tracing",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "match_cfg"
|
||||
version = "0.1.0"
|
||||
@@ -5203,26 +5146,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oauth2-types"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db9baa46cfc1969e04a7f8c31ee6718a8b4cb52ef31d7d91772f878052d872e1"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"data-encoding",
|
||||
"http 1.3.1",
|
||||
"language-tags",
|
||||
"mas-iana",
|
||||
"mas-jose",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_with",
|
||||
"sha2",
|
||||
"thiserror 1.0.69",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.36.7"
|
||||
@@ -5717,17 +5640,6 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkcs1"
|
||||
version = "0.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f"
|
||||
dependencies = [
|
||||
"der 0.7.10",
|
||||
"pkcs8 0.10.2",
|
||||
"spki 0.7.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkcs8"
|
||||
version = "0.9.0"
|
||||
@@ -6607,7 +6519,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-autumn"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum-macros",
|
||||
@@ -6645,7 +6557,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-bonfire"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"async-channel 2.5.0",
|
||||
"async-std",
|
||||
@@ -6676,7 +6588,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-coalesced"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"indexmap 2.11.4",
|
||||
"lru 0.7.8",
|
||||
@@ -6685,10 +6597,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-config"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"authifier",
|
||||
"cached",
|
||||
"config",
|
||||
"futures-locks",
|
||||
@@ -6703,7 +6614,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-crond"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"log",
|
||||
"revolt-config",
|
||||
@@ -6715,7 +6626,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-database"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"amqprs",
|
||||
"async-lock 2.8.0",
|
||||
@@ -6765,7 +6676,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-delta"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"amqprs",
|
||||
"async-channel 1.9.0",
|
||||
@@ -6815,7 +6726,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-files"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"aws-config",
|
||||
@@ -6838,7 +6749,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-gifbox"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum-extra",
|
||||
@@ -6860,7 +6771,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-january"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"async-recursion",
|
||||
"axum",
|
||||
@@ -6888,7 +6799,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-models"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"indexmap 1.9.3",
|
||||
"iso8601-timestamp",
|
||||
@@ -6907,14 +6818,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-parser"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"logos",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "revolt-permissions"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"async-trait",
|
||||
@@ -6929,7 +6840,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-presence"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"log",
|
||||
@@ -6941,7 +6852,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-pushd"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"amqprs",
|
||||
"anyhow",
|
||||
@@ -6969,7 +6880,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-ratelimits"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"authifier",
|
||||
@@ -6986,7 +6897,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt-result"
|
||||
version = "0.8.9"
|
||||
version = "0.8.8"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"log",
|
||||
@@ -7216,11 +7127,11 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rocket_authifier"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1f98a5be96ac4144ee1adc809c1594e8212032b8a08d9bc4cef70735dfd976e"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"authifier",
|
||||
"iso8601-timestamp",
|
||||
"mongodb",
|
||||
"revolt_okapi",
|
||||
"revolt_rocket_okapi",
|
||||
"rocket",
|
||||
@@ -7339,7 +7250,7 @@ dependencies = [
|
||||
"num-integer",
|
||||
"num-iter",
|
||||
"num-traits",
|
||||
"pkcs1 0.4.1",
|
||||
"pkcs1",
|
||||
"pkcs8 0.9.0",
|
||||
"rand_core 0.6.4",
|
||||
"signature 1.6.4",
|
||||
@@ -7348,26 +7259,6 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rsa"
|
||||
version = "0.9.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40a0376c50d0358279d9d643e4bf7b7be212f1f4ff1da9070a7b54d22ef75c88"
|
||||
dependencies = [
|
||||
"const-oid 0.9.6",
|
||||
"digest",
|
||||
"num-bigint-dig",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
"pkcs1 0.7.5",
|
||||
"pkcs8 0.10.2",
|
||||
"rand_core 0.6.4",
|
||||
"signature 2.2.0",
|
||||
"spki 0.7.3",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-argon2"
|
||||
version = "1.0.1"
|
||||
@@ -7605,13 +7496,11 @@ version = "0.8.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"dyn-clone",
|
||||
"indexmap 1.9.3",
|
||||
"schemars_derive",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -8203,18 +8092,6 @@ version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
|
||||
|
||||
[[package]]
|
||||
name = "simple_asn1"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb"
|
||||
dependencies = [
|
||||
"num-bigint",
|
||||
"num-traits",
|
||||
"thiserror 2.0.16",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "simplecss"
|
||||
version = "0.2.2"
|
||||
|
||||
@@ -37,9 +37,6 @@ The services and libraries that power the Revolt service.<br/>
|
||||
|
||||
Rust 1.86.0 or higher.
|
||||
|
||||
> [!CAUTION]
|
||||
> The events server has a significant performance regression between Rust 1.77.2 and 1.78.0 onwards, see [issue #341](https://github.com/revoltchat/backend/issues/341). This is currently solved by build time options but we are looking for a proper fix.
|
||||
|
||||
## Development Guide
|
||||
|
||||
Before contributing, make yourself familiar with [our contribution guidelines](https://developers.revolt.chat/contrib.html) and the [technical documentation for this project](https://revoltchat.github.io/backend/).
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[package]
|
||||
name = "revolt-bonfire"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
license = "AGPL-3.0-or-later"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -42,7 +43,7 @@ revolt-result = { path = "../core/result" }
|
||||
revolt-models = { path = "../core/models" }
|
||||
revolt-config = { path = "../core/config" }
|
||||
revolt-database = { path = "../core/database", features = ["voice"] }
|
||||
revolt-permissions = { version = "0.8.9", path = "../core/permissions" }
|
||||
revolt-permissions = { path = "../core/permissions" }
|
||||
revolt-presence = { path = "../core/presence", features = ["redis-is-patched"] }
|
||||
|
||||
# redis
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-coalesced"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = ["Paul Makles <me@insrt.uk>", "Zomatree <me@zomatree.live>"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-config"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = ["Paul Makles <me@insrt.uk>"]
|
||||
@@ -37,7 +37,4 @@ sentry = { version = "0.31.5", optional = true }
|
||||
sentry-anyhow = { version = "0.38.1", optional = true }
|
||||
|
||||
# Core
|
||||
revolt-result = { version = "0.8.9", path = "../result", optional = true }
|
||||
|
||||
# Authifier
|
||||
authifier = "1.0.15"
|
||||
revolt-result = { version = "0.9.2", path = "../result", optional = true }
|
||||
|
||||
@@ -74,8 +74,6 @@ max_concurrent_connections = 50
|
||||
# How long to ring devices for when calling in dms/groups, in seconds
|
||||
call_ring_duration = 30
|
||||
|
||||
[api.sso]
|
||||
|
||||
[api.livekit.nodes]
|
||||
|
||||
[api.users]
|
||||
|
||||
@@ -5,7 +5,6 @@ use config::{Config, File, FileFormat};
|
||||
use futures_locks::RwLock;
|
||||
use once_cell::sync::Lazy;
|
||||
use serde::Deserialize;
|
||||
use authifier::config::SSO;
|
||||
|
||||
#[cfg(feature = "sentry")]
|
||||
pub use sentry::{capture_error, capture_message, Level};
|
||||
@@ -230,7 +229,6 @@ pub struct Api {
|
||||
pub workers: ApiWorkers,
|
||||
pub livekit: ApiLiveKit,
|
||||
pub users: ApiUsers,
|
||||
pub sso: SSO,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-database"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-or-later"
|
||||
authors = ["Paul Makles <me@insrt.uk>"]
|
||||
@@ -25,19 +25,19 @@ default = ["mongodb", "async-std-runtime", "tasks"]
|
||||
|
||||
[dependencies]
|
||||
# Core
|
||||
revolt-config = { version = "0.8.9", path = "../config", features = [
|
||||
revolt-config = { version = "0.9.2", path = "../config", features = [
|
||||
"report-macros",
|
||||
] }
|
||||
revolt-result = { version = "0.8.9", path = "../result" }
|
||||
revolt-models = { version = "0.8.9", path = "../models", features = [
|
||||
revolt-result = { version = "0.9.2", path = "../result" }
|
||||
revolt-models = { version = "0.9.2", path = "../models", features = [
|
||||
"validator",
|
||||
] }
|
||||
revolt-presence = { version = "0.8.9", path = "../presence" }
|
||||
revolt-permissions = { version = "0.8.9", path = "../permissions", features = [
|
||||
revolt-presence = { version = "0.9.2", path = "../presence" }
|
||||
revolt-permissions = { version = "0.9.2", path = "../permissions", features = [
|
||||
"serde",
|
||||
"bson",
|
||||
] }
|
||||
revolt-parser = { version = "0.8.9", path = "../parser" }
|
||||
revolt-parser = { version = "0.9.2", path = "../parser" }
|
||||
|
||||
# Utility
|
||||
log = "0.4"
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
],
|
||||
"roles": {
|
||||
"__ID:5__": {
|
||||
"_id": "__ID:5__",
|
||||
"name": "Moderator",
|
||||
"permissions": {
|
||||
"a": 545270208,
|
||||
@@ -55,6 +56,7 @@
|
||||
"rank": 1
|
||||
},
|
||||
"__ID:6__": {
|
||||
"_id": "__ID:6__",
|
||||
"name": "Owner",
|
||||
"permissions": {
|
||||
"a": 0,
|
||||
|
||||
@@ -209,8 +209,6 @@ impl Database {
|
||||
} else {
|
||||
EmailVerificationConfig::Disabled
|
||||
},
|
||||
sso: config.api.sso.clone(),
|
||||
server_url: Some(config.hosts.api.parse().expect("Failed to parse API host url.")),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -246,7 +244,6 @@ impl Database {
|
||||
event_channel: Some(crate::tasks::authifier_relay::sender()),
|
||||
#[cfg(not(feature = "tasks"))]
|
||||
event_channel: None,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ struct MigrationInfo {
|
||||
revision: i32,
|
||||
}
|
||||
|
||||
pub const LATEST_REVISION: i32 = 49; // MUST BE +1 to last migration
|
||||
pub const LATEST_REVISION: i32 = 50; // MUST BE +1 to last migration
|
||||
|
||||
pub async fn migrate_database(db: &MongoDb) {
|
||||
let migrations = db.col::<Document>("migrations");
|
||||
@@ -1246,7 +1246,7 @@ pub async fn run_migrations(db: &MongoDb, revision: i32) -> i32 {
|
||||
.expect("Failed to update voice channels");
|
||||
};
|
||||
|
||||
if revision <= 48 {
|
||||
if revision <= 48 {
|
||||
info!("Running migration [revision 48 / 22-10-2025]: Add Video + Listen to default permissions");
|
||||
|
||||
db.col::<Document>("servers")
|
||||
@@ -1264,6 +1264,48 @@ pub async fn run_migrations(db: &MongoDb, revision: i32) -> i32 {
|
||||
.expect("Failed to update default_permissions");
|
||||
};
|
||||
|
||||
if revision <= 49 {
|
||||
info!("Running migration [revision 49 / 12-12-2025]: Add _id key to roles");
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
struct Server {
|
||||
#[serde(rename = "_id")]
|
||||
pub id: String,
|
||||
#[serde(default = "HashMap::<String, Document>::new")]
|
||||
pub roles: HashMap<String, Document>,
|
||||
}
|
||||
|
||||
let mut servers = db
|
||||
.db()
|
||||
.collection::<Server>("servers")
|
||||
.find(doc! {
|
||||
"roles": {
|
||||
"$exists": true,
|
||||
"$ne": {}
|
||||
}
|
||||
})
|
||||
.await
|
||||
.unwrap()
|
||||
.map(|res| res.expect("Failed to decode Server { id, roles }"));
|
||||
|
||||
while let Some(server) = servers.next().await {
|
||||
let mut doc = doc! {};
|
||||
|
||||
for id in server.roles.keys() {
|
||||
doc.insert(
|
||||
format!("roles.{id}._id"),
|
||||
id,
|
||||
);
|
||||
}
|
||||
|
||||
db.db()
|
||||
.collection::<Server>("servers")
|
||||
.update_one(doc! { "_id": &server.id }, doc! { "$set": doc })
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
};
|
||||
|
||||
// Reminder to update LATEST_REVISION when adding new migrations.
|
||||
LATEST_REVISION.max(revision)
|
||||
}
|
||||
|
||||
@@ -68,6 +68,9 @@ auto_derived_partial!(
|
||||
auto_derived_partial!(
|
||||
/// Role
|
||||
pub struct Role {
|
||||
/// Unique Id
|
||||
#[serde(rename = "_id")]
|
||||
pub id: String,
|
||||
/// Role name
|
||||
pub name: String,
|
||||
/// Permissions available to this role
|
||||
@@ -246,7 +249,6 @@ impl Server {
|
||||
role.update(
|
||||
db,
|
||||
&self.id,
|
||||
role_id,
|
||||
PartialRole {
|
||||
permissions: Some(permissions),
|
||||
..Default::default()
|
||||
@@ -297,6 +299,7 @@ impl Role {
|
||||
/// Into optional struct
|
||||
pub fn into_optional(self) -> PartialRole {
|
||||
PartialRole {
|
||||
id: Some(self.id),
|
||||
name: Some(self.name),
|
||||
permissions: Some(self.permissions),
|
||||
colour: self.colour,
|
||||
@@ -306,20 +309,29 @@ impl Role {
|
||||
}
|
||||
|
||||
/// Create a role
|
||||
pub async fn create(&self, db: &Database, server_id: &str) -> Result<String> {
|
||||
let role_id = Ulid::new().to_string();
|
||||
db.insert_role(server_id, &role_id, self).await?;
|
||||
pub async fn create(db: &Database, server: &Server, name: String) -> Result<Self> {
|
||||
let role = Role {
|
||||
id: Ulid::new().to_string(),
|
||||
name,
|
||||
// Rank of the new role should be below the lowest role
|
||||
rank: server.roles.len() as i64,
|
||||
colour: None,
|
||||
hoist: false,
|
||||
permissions: Default::default(),
|
||||
};
|
||||
|
||||
db.insert_role(&server.id, &role).await?;
|
||||
|
||||
EventV1::ServerRoleUpdate {
|
||||
id: server_id.to_string(),
|
||||
role_id: role_id.to_string(),
|
||||
data: self.clone().into_optional().into(),
|
||||
id: server.id.clone(),
|
||||
role_id: role.id.clone(),
|
||||
data: role.clone().into_optional().into(),
|
||||
clear: vec![],
|
||||
}
|
||||
.p(server_id.to_string())
|
||||
.p(server.id.clone())
|
||||
.await;
|
||||
|
||||
Ok(role_id)
|
||||
Ok(role)
|
||||
}
|
||||
|
||||
/// Update server data
|
||||
@@ -327,7 +339,6 @@ impl Role {
|
||||
&mut self,
|
||||
db: &Database,
|
||||
server_id: &str,
|
||||
role_id: &str,
|
||||
partial: PartialRole,
|
||||
remove: Vec<FieldsRole>,
|
||||
) -> Result<()> {
|
||||
@@ -337,14 +348,14 @@ impl Role {
|
||||
|
||||
self.apply_options(partial.clone());
|
||||
|
||||
db.update_role(server_id, role_id, &partial, remove.clone())
|
||||
db.update_role(server_id, &self.id, &partial, remove.clone())
|
||||
.await?;
|
||||
|
||||
EventV1::ServerRoleUpdate {
|
||||
id: server_id.to_string(),
|
||||
role_id: role_id.to_string(),
|
||||
role_id: self.id.clone(),
|
||||
data: partial.into(),
|
||||
clear: vec![],
|
||||
clear: remove.into_iter().map(Into::into).collect(),
|
||||
}
|
||||
.p(server_id.to_string())
|
||||
.await;
|
||||
@@ -360,15 +371,15 @@ impl Role {
|
||||
}
|
||||
|
||||
/// Delete a role
|
||||
pub async fn delete(self, db: &Database, server_id: &str, role_id: &str) -> Result<()> {
|
||||
pub async fn delete(self, db: &Database, server_id: &str) -> Result<()> {
|
||||
EventV1::ServerRoleDelete {
|
||||
id: server_id.to_string(),
|
||||
role_id: role_id.to_string(),
|
||||
role_id: self.id.clone(),
|
||||
}
|
||||
.p(server_id.to_string())
|
||||
.await;
|
||||
|
||||
db.delete_role(server_id, role_id).await
|
||||
db.delete_role(server_id, &self.id).await
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ pub trait AbstractServers: Sync + Send {
|
||||
async fn delete_server(&self, id: &str) -> Result<()>;
|
||||
|
||||
/// Insert a new role into server object
|
||||
async fn insert_role(&self, server_id: &str, role_id: &str, role: &Role) -> Result<()>;
|
||||
async fn insert_role(&self, server_id: &str, role: &Role) -> Result<()>;
|
||||
|
||||
/// Update an existing role on a server
|
||||
async fn update_role(
|
||||
|
||||
@@ -69,7 +69,7 @@ impl AbstractServers for MongoDb {
|
||||
}
|
||||
|
||||
/// Insert a new role into server object
|
||||
async fn insert_role(&self, server_id: &str, role_id: &str, role: &Role) -> Result<()> {
|
||||
async fn insert_role(&self, server_id: &str, role: &Role) -> Result<()> {
|
||||
self.col::<Document>(COL)
|
||||
.update_one(
|
||||
doc! {
|
||||
@@ -77,7 +77,7 @@ impl AbstractServers for MongoDb {
|
||||
},
|
||||
doc! {
|
||||
"$set": {
|
||||
"roles.".to_owned() + role_id: to_document(role)
|
||||
"roles.".to_owned() + &role.id: to_document(role)
|
||||
.map_err(|_| create_database_error!("to_document", "role"))?
|
||||
}
|
||||
},
|
||||
|
||||
@@ -72,10 +72,10 @@ impl AbstractServers for ReferenceDb {
|
||||
}
|
||||
|
||||
/// Insert a new role into server object
|
||||
async fn insert_role(&self, server_id: &str, role_id: &str, role: &Role) -> Result<()> {
|
||||
async fn insert_role(&self, server_id: &str, role: &Role) -> Result<()> {
|
||||
let mut servers = self.servers.lock().await;
|
||||
if let Some(server) = servers.get_mut(server_id) {
|
||||
server.roles.insert(role_id.to_string(), role.clone());
|
||||
server.roles.insert(role.id.clone(), role.clone());
|
||||
Ok(())
|
||||
} else {
|
||||
Err(create_error!(NotFound))
|
||||
|
||||
@@ -896,6 +896,7 @@ impl From<SystemMessageChannels> for crate::SystemMessageChannels {
|
||||
impl From<crate::Role> for Role {
|
||||
fn from(value: crate::Role) -> Self {
|
||||
Role {
|
||||
id: value.id,
|
||||
name: value.name,
|
||||
permissions: value.permissions,
|
||||
colour: value.colour,
|
||||
@@ -908,6 +909,7 @@ impl From<crate::Role> for Role {
|
||||
impl From<Role> for crate::Role {
|
||||
fn from(value: Role) -> crate::Role {
|
||||
crate::Role {
|
||||
id: value.id,
|
||||
name: value.name,
|
||||
permissions: value.permissions,
|
||||
colour: value.colour,
|
||||
@@ -920,6 +922,7 @@ impl From<Role> for crate::Role {
|
||||
impl From<crate::PartialRole> for PartialRole {
|
||||
fn from(value: crate::PartialRole) -> Self {
|
||||
PartialRole {
|
||||
id: value.id,
|
||||
name: value.name,
|
||||
permissions: value.permissions,
|
||||
colour: value.colour,
|
||||
@@ -932,6 +935,7 @@ impl From<crate::PartialRole> for PartialRole {
|
||||
impl From<PartialRole> for crate::PartialRole {
|
||||
fn from(value: PartialRole) -> crate::PartialRole {
|
||||
crate::PartialRole {
|
||||
id: value.id,
|
||||
name: value.name,
|
||||
permissions: value.permissions,
|
||||
colour: value.colour,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-files"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-or-later"
|
||||
authors = ["Paul Makles <me@insrt.uk>"]
|
||||
@@ -20,10 +20,10 @@ typenum = "1.17.0"
|
||||
aws-config = "1.5.5"
|
||||
aws-sdk-s3 = { version = "1.46.0", features = ["behavior-version-latest"] }
|
||||
|
||||
revolt-config = { version = "0.8.9", path = "../config", features = [
|
||||
revolt-config = { version = "0.9.2", path = "../config", features = [
|
||||
"report-macros",
|
||||
] }
|
||||
revolt-result = { version = "0.8.9", path = "../result" }
|
||||
revolt-result = { version = "0.9.2", path = "../result" }
|
||||
|
||||
# image processing
|
||||
jxl-oxide = "0.8.1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-models"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = ["Paul Makles <me@insrt.uk>"]
|
||||
@@ -20,8 +20,8 @@ default = ["serde", "partials", "rocket"]
|
||||
|
||||
[dependencies]
|
||||
# Core
|
||||
revolt-config = { version = "0.8.9", path = "../config" }
|
||||
revolt-permissions = { version = "0.8.9", path = "../permissions" }
|
||||
revolt-config = { version = "0.9.2", path = "../config" }
|
||||
revolt-permissions = { version = "0.9.2", path = "../permissions" }
|
||||
|
||||
# Utility
|
||||
regex = "1.11"
|
||||
|
||||
@@ -85,6 +85,9 @@ auto_derived_partial!(
|
||||
auto_derived_partial!(
|
||||
/// Role
|
||||
pub struct Role {
|
||||
/// Unique Id
|
||||
#[cfg_attr(feature = "serde", serde(rename = "_id"))]
|
||||
pub id: String,
|
||||
/// Role name
|
||||
pub name: String,
|
||||
/// Permissions available to this role
|
||||
@@ -181,6 +184,7 @@ auto_derived!(
|
||||
}
|
||||
|
||||
/// Response after creating new role
|
||||
// TODO: remove this in favor of just Role
|
||||
pub struct NewRoleResponse {
|
||||
/// Id of the role
|
||||
pub id: String,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-parser"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = ["Zomatree <me@zomatree.live>", "Paul Makles <me@insrt.uk>"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-permissions"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = ["Paul Makles <me@insrt.uk>"]
|
||||
@@ -21,7 +21,7 @@ async-std = { version = "1.8.0", features = ["attributes"] }
|
||||
|
||||
[dependencies]
|
||||
# Core
|
||||
revolt-result = { version = "0.8.9", path = "../result" }
|
||||
revolt-result = { version = "0.9.2", path = "../result" }
|
||||
|
||||
# Utility
|
||||
auto_ops = "0.3.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-presence"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-or-later"
|
||||
authors = ["Paul Makles <me@insrt.uk>"]
|
||||
@@ -16,7 +16,7 @@ redis-is-patched = []
|
||||
async-std = { version = "1.8.0", features = ["attributes"] }
|
||||
|
||||
# Config for loading Redis URI
|
||||
revolt-config = { version = "0.8.9", path = "../config" }
|
||||
revolt-config = { version = "0.9.2", path = "../config" }
|
||||
|
||||
[dependencies]
|
||||
# Utility
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-ratelimits"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2024"
|
||||
|
||||
[features]
|
||||
@@ -10,9 +10,9 @@ axum = ["dep:axum", "revolt-database/axum-impl"]
|
||||
default = ["rocket", "axum"]
|
||||
|
||||
[dependencies]
|
||||
revolt-database = { version = "0.8.9", path = "../database"}
|
||||
revolt-result = { version = "0.8.9", path = "../result" }
|
||||
revolt-config = { version = "0.8.9", path = "../config" }
|
||||
revolt-database = { version = "0.9.2", path = "../database"}
|
||||
revolt-result = { version = "0.9.2", path = "../result" }
|
||||
revolt-config = { version = "0.9.2", path = "../config" }
|
||||
|
||||
rocket = { version = "0.5.1", optional = true }
|
||||
revolt_rocket_okapi = { version = "0.10.0", optional = true }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt-result"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = ["Paul Makles <me@insrt.uk>"]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
[package]
|
||||
name = "revolt-crond"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
license = "AGPL-3.0-or-later"
|
||||
authors = ["Paul Makles <me@insrt.uk>"]
|
||||
edition = "2021"
|
||||
description = "Revolt Daemon Service: Timed data clean up tasks"
|
||||
publish = false
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -16,7 +17,7 @@ log = "0.4"
|
||||
tokio = { version = "1" }
|
||||
|
||||
# Core
|
||||
revolt-database = { version = "0.8.9", path = "../../core/database" }
|
||||
revolt-result = { version = "0.8.9", path = "../../core/result" }
|
||||
revolt-config = { version = "0.8.9", path = "../../core/config" }
|
||||
revolt-files = { version = "0.8.9", path = "../../core/files" }
|
||||
revolt-database = { version = "0.9.2", path = "../../core/database" }
|
||||
revolt-result = { version = "0.9.2", path = "../../core/result" }
|
||||
revolt-config = { version = "0.9.2", path = "../../core/config" }
|
||||
revolt-files = { version = "0.9.2", path = "../../core/files" }
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
[package]
|
||||
name = "revolt-pushd"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-or-later"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
revolt-result = { version = "0.8.9", path = "../../core/result" }
|
||||
revolt-config = { version = "0.8.9", path = "../../core/config", features = [
|
||||
revolt-result = { version = "0.9.2", path = "../../core/result" }
|
||||
revolt-config = { version = "0.9.2", path = "../../core/config", features = [
|
||||
"report-macros",
|
||||
"anyhow"
|
||||
] }
|
||||
revolt-database = { version = "0.8.9", path = "../../core/database" }
|
||||
revolt-models = { version = "0.8.9", path = "../../core/models", features = [
|
||||
revolt-database = { version = "0.9.2", path = "../../core/database" }
|
||||
revolt-models = { version = "0.9.2", path = "../../core/models", features = [
|
||||
"validator",
|
||||
] }
|
||||
revolt-presence = { version = "0.8.9", path = "../../core/presence", features = [
|
||||
revolt-presence = { version = "0.9.2", path = "../../core/presence", features = [
|
||||
"redis-is-patched",
|
||||
] }
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[package]
|
||||
name = "revolt-voice-ingress"
|
||||
version = "0.7.1"
|
||||
version = "0.9.2"
|
||||
license = "AGPL-3.0-or-later"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
[package]
|
||||
name = "revolt-delta"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
license = "AGPL-3.0-or-later"
|
||||
authors = ["Paul Makles <paulmakles@gmail.com>"]
|
||||
edition = "2018"
|
||||
publish = false
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
],
|
||||
"roles": {
|
||||
"__ID:5__": {
|
||||
"_id": "__ID:5__",
|
||||
"name": "Moderator",
|
||||
"permissions": {
|
||||
"a": 545270216,
|
||||
@@ -55,6 +56,7 @@
|
||||
"rank": 1
|
||||
},
|
||||
"__ID:6__": {
|
||||
"_id": "__ID:6__",
|
||||
"name": "Owner",
|
||||
"permissions": {
|
||||
"a": 0,
|
||||
@@ -63,6 +65,7 @@
|
||||
"rank": 0
|
||||
},
|
||||
"__ID:7__": {
|
||||
"_id": "__ID:7__",
|
||||
"name": "Lower Rank 1",
|
||||
"permissions": {
|
||||
"a": 0,
|
||||
@@ -71,6 +74,7 @@
|
||||
"rank": 2
|
||||
},
|
||||
"__ID:8__": {
|
||||
"_id": "__ID:8__",
|
||||
"name": "Lower Rank 2",
|
||||
"permissions": {
|
||||
"a": 0,
|
||||
|
||||
@@ -151,29 +151,20 @@ mod test {
|
||||
name: "Hidden Channel".to_string(),
|
||||
description: None,
|
||||
nsfw: Some(false),
|
||||
voice: None
|
||||
voice: None,
|
||||
},
|
||||
true,
|
||||
)
|
||||
.await
|
||||
.expect("Failed to make new channel");
|
||||
|
||||
let role = Role {
|
||||
name: "Show Hidden Channel".to_string(),
|
||||
permissions: OverrideField { a: 0, d: 0 },
|
||||
colour: None,
|
||||
hoist: false,
|
||||
rank: 5,
|
||||
};
|
||||
|
||||
let role_id = role
|
||||
.create(&harness.db, &server.id)
|
||||
let role = Role::create(&harness.db, &server, "Show Hidden Channel".to_string())
|
||||
.await
|
||||
.expect("Failed to create the role");
|
||||
|
||||
let mut overrides = HashMap::new();
|
||||
overrides.insert(
|
||||
role_id.clone(),
|
||||
role.id.clone(),
|
||||
OverrideField {
|
||||
a: (ChannelPermission::ViewChannel) as i64,
|
||||
d: 0,
|
||||
@@ -281,7 +272,7 @@ mod test {
|
||||
"Mention failed to be scrubbed when the user cannot see the channel"
|
||||
);
|
||||
|
||||
let second_member_roles = vec![role_id.clone()];
|
||||
let second_member_roles = vec![role.id.clone()];
|
||||
let partial = PartialMember {
|
||||
id: None,
|
||||
joined_at: None,
|
||||
@@ -290,7 +281,7 @@ mod test {
|
||||
timeout: None,
|
||||
roles: Some(second_member_roles),
|
||||
can_publish: None,
|
||||
can_receive: None
|
||||
can_receive: None,
|
||||
};
|
||||
second_member
|
||||
.update(&harness.db, partial, vec![])
|
||||
@@ -496,7 +487,7 @@ mod test {
|
||||
let (_, _, other_user) = harness.new_user().await;
|
||||
let (server, _) = harness.new_server(&user).await;
|
||||
let channel = harness.new_channel(&server).await;
|
||||
let (role_id, _role) = harness
|
||||
let role = harness
|
||||
.new_role(
|
||||
&server,
|
||||
1,
|
||||
@@ -518,7 +509,7 @@ mod test {
|
||||
Some(&harness.amqp),
|
||||
channel.clone(),
|
||||
v0::DataMessageSend {
|
||||
content: Some(format!("Mentioning @everyone and role <%{}>", &role_id)),
|
||||
content: Some(format!("Mentioning @everyone and role <%{}>", &role.id)),
|
||||
nonce: None,
|
||||
attachments: None,
|
||||
replies: None,
|
||||
@@ -563,7 +554,7 @@ mod test {
|
||||
Some(&harness.amqp),
|
||||
channel.clone(),
|
||||
v0::DataMessageSend {
|
||||
content: Some(format!("Mentioning `@everyone` and role `<%{}>`", &role_id)),
|
||||
content: Some(format!("Mentioning `@everyone` and role `<%{}>`", &role.id)),
|
||||
nonce: None,
|
||||
attachments: None,
|
||||
replies: None,
|
||||
@@ -605,7 +596,7 @@ mod test {
|
||||
"Role mentions detected when inside codeblock"
|
||||
);
|
||||
|
||||
other_member.roles.push(role_id.clone());
|
||||
other_member.roles.push(role.id.clone());
|
||||
harness
|
||||
.db
|
||||
.update_member(
|
||||
@@ -615,10 +606,10 @@ mod test {
|
||||
id: None,
|
||||
joined_at: None,
|
||||
nickname: None,
|
||||
roles: Some(vec![role_id.clone()]),
|
||||
roles: Some(vec![role.id.clone()]),
|
||||
timeout: None,
|
||||
can_publish: None,
|
||||
can_receive: None
|
||||
can_receive: None,
|
||||
},
|
||||
vec![],
|
||||
)
|
||||
@@ -632,7 +623,7 @@ mod test {
|
||||
Some(&harness.amqp),
|
||||
channel.clone(),
|
||||
v0::DataMessageSend {
|
||||
content: Some(format!("Mentioning @everyone and role <%{}>", &role_id)),
|
||||
content: Some(format!("Mentioning @everyone and role <%{}>", &role.id)),
|
||||
nonce: None,
|
||||
attachments: None,
|
||||
replies: None,
|
||||
|
||||
@@ -36,7 +36,6 @@ pub fn mount(config: Settings, mut rocket: Rocket<Build>) -> Rocket<Build> {
|
||||
"/auth/account" => rocket_authifier::routes::account::routes(),
|
||||
"/auth/session" => rocket_authifier::routes::session::routes(),
|
||||
"/auth/mfa" => rocket_authifier::routes::mfa::routes(),
|
||||
"/auth/sso" => rocket_authifier::routes::sso::routes(),
|
||||
"/onboard" => onboard::routes(),
|
||||
"/policy" => policy::routes(),
|
||||
"/push" => push::routes(),
|
||||
@@ -58,7 +57,6 @@ pub fn mount(config: Settings, mut rocket: Rocket<Build>) -> Rocket<Build> {
|
||||
"/auth/account" => rocket_authifier::routes::account::routes(),
|
||||
"/auth/session" => rocket_authifier::routes::session::routes(),
|
||||
"/auth/mfa" => rocket_authifier::routes::mfa::routes(),
|
||||
"/auth/sso" => rocket_authifier::routes::sso::routes(),
|
||||
"/onboard" => onboard::routes(),
|
||||
"/policy" => policy::routes(),
|
||||
"/push" => push::routes(),
|
||||
@@ -81,7 +79,6 @@ pub fn mount(config: Settings, mut rocket: Rocket<Build>) -> Rocket<Build> {
|
||||
"/auth/account" => rocket_authifier::routes::account::routes(),
|
||||
"/auth/session" => rocket_authifier::routes::session::routes(),
|
||||
"/auth/mfa" => rocket_authifier::routes::mfa::routes(),
|
||||
"/auth/sso" => rocket_authifier::routes::sso::routes(),
|
||||
"/onboard" => onboard::routes(),
|
||||
"/push" => push::routes(),
|
||||
"/sync" => sync::routes(),
|
||||
@@ -102,7 +99,6 @@ pub fn mount(config: Settings, mut rocket: Rocket<Build>) -> Rocket<Build> {
|
||||
"/auth/account" => rocket_authifier::routes::account::routes(),
|
||||
"/auth/session" => rocket_authifier::routes::session::routes(),
|
||||
"/auth/mfa" => rocket_authifier::routes::mfa::routes(),
|
||||
"/auth/sso" => rocket_authifier::routes::sso::routes(),
|
||||
"/onboard" => onboard::routes(),
|
||||
"/push" => push::routes(),
|
||||
"/sync" => sync::routes()
|
||||
|
||||
@@ -40,17 +40,10 @@ pub async fn create(
|
||||
}));
|
||||
};
|
||||
|
||||
let role = Role {
|
||||
name: data.name,
|
||||
// Rank of the new role should be below the lowest role
|
||||
rank: server.roles.len() as i64,
|
||||
colour: None,
|
||||
hoist: false,
|
||||
permissions: Default::default(),
|
||||
};
|
||||
let role = Role::create(db, &server, data.name).await?;
|
||||
|
||||
Ok(Json(v0::NewRoleResponse {
|
||||
id: role.create(db, &server.id).await?,
|
||||
id: role.id.clone(),
|
||||
role: role.into(),
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ pub async fn delete(
|
||||
return Err(create_error!(NotElevated));
|
||||
}
|
||||
|
||||
role.delete(db, &server.id, &role_id).await?;
|
||||
role.delete(db, &server.id).await?;
|
||||
|
||||
for channel_id in &server.channels {
|
||||
let channel = Reference::from_unchecked(channel_id).as_channel(db).await?;
|
||||
|
||||
@@ -61,7 +61,6 @@ pub async fn edit(
|
||||
role.update(
|
||||
db,
|
||||
&server.id,
|
||||
&role_id,
|
||||
partial,
|
||||
remove.into_iter().map(Into::into).collect(),
|
||||
)
|
||||
|
||||
@@ -217,7 +217,6 @@ pub struct GithubComment {
|
||||
position: Option<u32>,
|
||||
reactions: Option<GithubReactions>,
|
||||
updated_at: Value,
|
||||
url: String,
|
||||
user: GithubUser,
|
||||
}
|
||||
|
||||
@@ -701,7 +700,7 @@ fn safe_from_str<T: for<'de> Deserialize<'de>>(data: &str) -> Result<T> {
|
||||
match serde_json::from_str(data) {
|
||||
Ok(output) => Ok(output),
|
||||
Err(err) => {
|
||||
log::error!("{err:?}");
|
||||
revolt_config::capture_internal_error!(err);
|
||||
Err(create_error!(InvalidOperation))
|
||||
}
|
||||
}
|
||||
@@ -753,12 +752,12 @@ pub async fn webhook_execute_github(
|
||||
db: &State<Database>,
|
||||
amqp: &State<AMQP>,
|
||||
webhook_id: Reference<'_>,
|
||||
token: String,
|
||||
token: &str,
|
||||
event: EventHeader<'_>,
|
||||
data: String,
|
||||
) -> Result<()> {
|
||||
let webhook = webhook_id.as_webhook(db).await?;
|
||||
webhook.assert_token(&token)?;
|
||||
webhook.assert_token(token)?;
|
||||
|
||||
let channel = db.fetch_channel(&webhook.channel_id).await?;
|
||||
let event = convert_event(&data, &event)?;
|
||||
@@ -897,10 +896,11 @@ pub async fn webhook_execute_github(
|
||||
url: Some(event.sender.html_url),
|
||||
title: Some(event.sender.login),
|
||||
description: Some(format!(
|
||||
"#### [{}] New discussion #{}: {}\n{}",
|
||||
"#### [[{}] New discussion #{}: {}]({})\n{}",
|
||||
event.repository.full_name,
|
||||
discussion.number,
|
||||
discussion.title,
|
||||
discussion.html_url,
|
||||
shorten_text(&discussion.body, 450)
|
||||
)),
|
||||
colour: Some(LIGHT_ORANGE.to_string()),
|
||||
@@ -911,10 +911,11 @@ pub async fn webhook_execute_github(
|
||||
url: Some(answer.comment.user.html_url),
|
||||
title: Some(answer.comment.user.login),
|
||||
description: Some(format!(
|
||||
"#### [{}] discussion #{} marked answered: {}\n{}",
|
||||
"#### [[{}] Discussion #{} marked answered: {}]({})\n{}",
|
||||
event.repository.full_name,
|
||||
discussion.number,
|
||||
discussion.title,
|
||||
answer.comment.html_url,
|
||||
shorten_text(&answer.comment.body, 450)
|
||||
)),
|
||||
colour: Some(LIGHT_ORANGE.to_string()),
|
||||
@@ -930,10 +931,11 @@ pub async fn webhook_execute_github(
|
||||
url: Some(comment.comment.user.html_url),
|
||||
title: Some(comment.comment.user.login),
|
||||
description: Some(format!(
|
||||
"[{}] New comment on discussion #{}: {}\n{}",
|
||||
"#### [[{}] New comment on discussion #{}: {}]({})\n{}",
|
||||
event.repository.full_name,
|
||||
discussion.number,
|
||||
discussion.title,
|
||||
comment.comment.html_url,
|
||||
shorten_text(&comment.comment.body, 450)
|
||||
)),
|
||||
colour: Some(LIGHT_ORANGE.to_string()),
|
||||
@@ -1002,7 +1004,7 @@ pub async fn webhook_execute_github(
|
||||
event.repository.full_name,
|
||||
issue.number,
|
||||
issue.title,
|
||||
issue.html_url,
|
||||
comment.html_url,
|
||||
shorten_text(&comment.body, 450)
|
||||
)),
|
||||
colour: Some(LIGHT_ORANGE.to_string()),
|
||||
|
||||
@@ -6,7 +6,7 @@ use futures::StreamExt;
|
||||
use rand::Rng;
|
||||
use redis_kiss::redis::aio::PubSub;
|
||||
use revolt_database::{
|
||||
events::client::EventV1, Channel, Database, Member, Message, Server, User, AMQP,
|
||||
events::client::EventV1, Channel, Database, Member, Message, PartialRole, Server, User, AMQP,
|
||||
};
|
||||
use revolt_database::{util::idempotency::IdempotencyKey, Role};
|
||||
use revolt_models::v0;
|
||||
@@ -104,7 +104,6 @@ impl TestHarness {
|
||||
mfa: Default::default(),
|
||||
password_reset: None,
|
||||
verification: EmailVerification::Verified,
|
||||
id_providers: Default::default(),
|
||||
};
|
||||
|
||||
self.authifier
|
||||
@@ -140,21 +139,26 @@ impl TestHarness {
|
||||
server: &Server,
|
||||
rank: i64,
|
||||
overrides: Option<OverrideField>,
|
||||
) -> (String, Role) {
|
||||
let role = Role {
|
||||
name: TestHarness::rand_string(),
|
||||
permissions: overrides.unwrap_or(OverrideField { a: 0, d: 0 }),
|
||||
rank,
|
||||
colour: None,
|
||||
hoist: false,
|
||||
};
|
||||
|
||||
let id = role
|
||||
.create(&self.db, &server.id)
|
||||
) -> Role {
|
||||
let mut role = Role::create(&self.db, &server, TestHarness::rand_string())
|
||||
.await
|
||||
.expect("Failed to create test role");
|
||||
|
||||
(id, role)
|
||||
if let Some(overrides) = overrides {
|
||||
role.update(
|
||||
&self.db,
|
||||
&server.id,
|
||||
PartialRole {
|
||||
permissions: Some(overrides),
|
||||
..Default::default()
|
||||
},
|
||||
Vec::new(),
|
||||
)
|
||||
.await
|
||||
.expect("Failed to set test role overrides");
|
||||
};
|
||||
|
||||
role
|
||||
}
|
||||
|
||||
pub async fn new_channel(&self, server: &Server) -> Channel {
|
||||
@@ -166,7 +170,7 @@ impl TestHarness {
|
||||
name: "Test Channel".to_string(),
|
||||
description: None,
|
||||
nsfw: Some(false),
|
||||
voice: None
|
||||
voice: None,
|
||||
},
|
||||
true,
|
||||
)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[package]
|
||||
name = "revolt-autumn"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-or-later"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
# ID generation
|
||||
@@ -43,16 +44,16 @@ tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
|
||||
# Core crates
|
||||
revolt-files = { version = "0.8.9", path = "../../core/files" }
|
||||
revolt-config = { version = "0.8.9", path = "../../core/config" }
|
||||
revolt-database = { version = "0.8.9", path = "../../core/database", features = [
|
||||
revolt-files = { version = "0.9.2", path = "../../core/files" }
|
||||
revolt-config = { version = "0.9.2", path = "../../core/config" }
|
||||
revolt-database = { version = "0.9.2", path = "../../core/database", features = [
|
||||
"axum-impl",
|
||||
] }
|
||||
revolt-result = { version = "0.8.9", path = "../../core/result", features = [
|
||||
revolt-result = { version = "0.9.2", path = "../../core/result", features = [
|
||||
"utoipa",
|
||||
"axum",
|
||||
] }
|
||||
revolt-ratelimits = { version = "0.8.9", path = "../../core/ratelimits", features = ["axum"] }
|
||||
revolt-ratelimits = { version = "0.9.2", path = "../../core/ratelimits", features = ["axum"] }
|
||||
|
||||
# Axum / web server
|
||||
tempfile = "3.12.0"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[package]
|
||||
name = "revolt-gifbox"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-or-later"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
# Serialisation
|
||||
@@ -16,19 +17,19 @@ tokio = { version = "1.0", features = ["full"] }
|
||||
reqwest = { version = "0.12", features = ["json"] }
|
||||
|
||||
# Core crates
|
||||
revolt-config = { version = "0.8.9", path = "../../core/config" }
|
||||
revolt-models = { version = "0.8.9", path = "../../core/models" }
|
||||
revolt-result = { version = "0.8.9", path = "../../core/result", features = [
|
||||
revolt-config = { version = "0.9.2", path = "../../core/config" }
|
||||
revolt-models = { version = "0.9.2", path = "../../core/models" }
|
||||
revolt-result = { version = "0.9.2", path = "../../core/result", features = [
|
||||
"utoipa",
|
||||
"axum",
|
||||
] }
|
||||
revolt-coalesced = { version = "0.8.9", path = "../../core/coalesced", features = [
|
||||
revolt-coalesced = { version = "0.9.2", path = "../../core/coalesced", features = [
|
||||
"queue",
|
||||
] }
|
||||
revolt-database = { version = "0.8.9", path = "../../core/database", features = [
|
||||
revolt-database = { version = "0.9.2", path = "../../core/database", features = [
|
||||
"axum-impl",
|
||||
] }
|
||||
revolt-ratelimits = { version = "0.8.9", path = "../../core/ratelimits", features = [
|
||||
revolt-ratelimits = { version = "0.9.2", path = "../../core/ratelimits", features = [
|
||||
"axum",
|
||||
] }
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[package]
|
||||
name = "revolt-january"
|
||||
version = "0.8.9"
|
||||
version = "0.9.2"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-or-later"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
# Utility
|
||||
@@ -32,13 +33,13 @@ tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
|
||||
# Core crates
|
||||
revolt-config = { version = "0.8.9", path = "../../core/config" }
|
||||
revolt-models = { version = "0.8.9", path = "../../core/models" }
|
||||
revolt-result = { version = "0.8.9", path = "../../core/result", features = [
|
||||
revolt-config = { version = "0.9.2", path = "../../core/config" }
|
||||
revolt-models = { version = "0.9.2", path = "../../core/models" }
|
||||
revolt-result = { version = "0.9.2", path = "../../core/result", features = [
|
||||
"utoipa",
|
||||
"axum",
|
||||
] }
|
||||
revolt-files = { version = "0.8.9", path = "../../core/files" }
|
||||
revolt-files = { version = "0.9.2", path = "../../core/files" }
|
||||
|
||||
# Axum / web server
|
||||
axum = { version = "0.7.5" }
|
||||
|
||||
21
justfile
21
justfile
@@ -1,21 +0,0 @@
|
||||
publish:
|
||||
cargo publish --package revolt-parser
|
||||
cargo publish --package revolt-result
|
||||
cargo publish --package revolt-config
|
||||
cargo publish --package revolt-files
|
||||
cargo publish --package revolt-permissions
|
||||
cargo publish --package revolt-models
|
||||
cargo publish --package revolt-presence
|
||||
cargo publish --package revolt-database
|
||||
|
||||
patch:
|
||||
cargo release version patch --execute
|
||||
|
||||
minor:
|
||||
cargo release version minor --execute
|
||||
|
||||
major:
|
||||
cargo release version major --execute
|
||||
|
||||
release:
|
||||
scripts/try-tag-and-release.sh
|
||||
307
release-please-config.json
Normal file
307
release-please-config.json
Normal file
@@ -0,0 +1,307 @@
|
||||
{
|
||||
"bootstrap-sha": "0cf4a8ecc41c7984ba3ee5664dd979c5f14b59b4",
|
||||
"packages": {
|
||||
".": {
|
||||
"changelog-path": "CHANGELOG.md",
|
||||
"release-type": "simple",
|
||||
"bump-minor-pre-major": false,
|
||||
"bump-patch-for-minor-pre-major": false,
|
||||
"draft": false,
|
||||
"prerelease": false,
|
||||
"include-component-in-tag": false,
|
||||
"extra-files": [
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/delta/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/bonfire/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/coalesced/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/config/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/config/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/database/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/database/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/database/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/database/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-models'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/database/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-presence'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/database/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-permissions'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/database/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-parser'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/files/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/files/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/files/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/models/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/models/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/models/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-permissions'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/parser/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/permissions/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/permissions/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/presence/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/presence/Cargo.toml",
|
||||
"jsonpath": "$['dev-dependencies']['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/ratelimits/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/ratelimits/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-database'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/ratelimits/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/ratelimits/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/core/result/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/crond/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/crond/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-database'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/crond/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/crond/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/crond/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-files'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/pushd/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/pushd/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/pushd/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/pushd/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-database'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/pushd/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-models'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/pushd/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-presence'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/daemons/voice-ingress/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/autumn/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/autumn/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-files'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/autumn/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/autumn/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-database'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/autumn/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/autumn/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-ratelimits'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/gifbox/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/gifbox/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/gifbox/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-models'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/gifbox/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/gifbox/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-coalesced'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/gifbox/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-database'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/gifbox/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-ratelimits'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/january/Cargo.toml",
|
||||
"jsonpath": "$.package.version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/january/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-config'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/january/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-models'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/january/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-result'].version"
|
||||
},
|
||||
{
|
||||
"type": "toml",
|
||||
"path": "crates/services/january/Cargo.toml",
|
||||
"jsonpath": "$.dependencies['revolt-files'].version"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
date=$(date +'%Y%m%d')
|
||||
incr=1
|
||||
|
||||
while [ $(git tag -l "$date-$incr") ]; do
|
||||
incr=$((incr+1))
|
||||
done
|
||||
|
||||
tag=$date-$incr
|
||||
echo About to tag and push $tag in 3 seconds...
|
||||
sleep 3s
|
||||
|
||||
git tag $tag
|
||||
git push --atomic origin $(git rev-parse --abbrev-ref HEAD) $tag
|
||||
1
version.txt
Normal file
1
version.txt
Normal file
@@ -0,0 +1 @@
|
||||
0.9.2
|
||||
Reference in New Issue
Block a user