forked from jmug/stoatchat
* initial livekit support fix up code undo changes to compose file add back .env.example * move voice states to global * track current state * more stuff * fix redis key inconsistancy * split voice ops into its own library * feat(livekit): more permission handling * feat(livekit): push unfinished code * fix: include voice states in servercreate event feat: call started system message in dms * feat: implement missing permission syncs * fix: remove locked rocket version * fix: remove local testing values from config * chore: switch to ids for parameter * feat: make Channel::server return a reference * feat: support multiple voice nodes * fix: expose list of nodes * fix: respond with the url when joining a voice channel * feat: being moved between voice channels * fix: use existing node if someone is already in the voice channel * refactor: Remove VoiceChannel * chore: add pushd to debug image script * refactor: add error messages for Rabbit issues * docs: add some notes on overrides; fix defaults * fix: ensure limit is always at least 1 when sent to database * fix: change permission check for fetching channel webhooks * chore: mount API at /0.8/ as well * fix: ensure ratelimiter adjusts for version prefix * chore: bump version to 0.8.2 * chore: disable LTO because it likely overloads GitHub worker * fix: don't allow users to time themselves out closes #376 * fix: match new error type for status code * feat: init crond crate * feat: file deletion implementation * chore: fix version references * feat: add crond container definitions * chore: clarify cargo deny / tomls * feat: add company information to email footers * chore: bump version to 0.8.3 * fix: don't bump the lockfile version * fix: include `production` default value for config * chore: ignore python venv and dev script for user generation Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * test: Add tests for invite/fetch Signed-off-by: phazeschift <51278042+phazeschift@users.noreply.github.com> * test: add utilities for common setup Signed-off-by: phazeschift <51278042+phazeschift@users.noreply.github.com> * test: add delete server channel test Signed-off-by: phazeschift <51278042+phazeschift@users.noreply.github.com> * feat: allow to set an icon when creating a group Signed-off-by: Nils Ponsard <nilsponsard@gmail.com> * fix: allow message pinning and unpinning for DM-like channels Signed-off-by: Bradlee Barnes <69256931+StupidRepo@users.noreply.github.com> * fix: remove SavedMessages and Group due to given permissions Signed-off-by: Bradlee Barnes <69256931+StupidRepo@users.noreply.github.com> * feat: allow bots to manage emojis (#407) * Remove bot check on emoji create Signed-off-by: Builderb <builderbgamer@gmail.com> * Remove bot check on emoji delete Signed-off-by: Builderb <builderbgamer@gmail.com> --------- Signed-off-by: Builderb <builderbgamer@gmail.com> * feat: add option to send message with missing replies Signed-off-by: ShaksterNano <54268387+shaksternano@users.noreply.github.com> * chore: bump version to 0.8.4 chore: enable webhooks in test builds * ci: downgrade lockfile * feat: Add Mass Mentions to the backend (#394) * feat: create base of push daemon Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * Add outbound senders * Make web_push send to rabbit instead (temp stuff) * feat: stability and friend requests * make vapid fr stuff not suck * swap naming of queue * move pushd into daemons folder * fix cargo file for move into daemons folder * feat: probably working fcm push notifs * comment out fcm webpush stuff since the config keys dont exist * fix fcm, name queues according to their prod status and configure routing keys * add pushd to docker * mix: Remove old code, add stuff to pushd * fix: lockfile * feat: update rocket to 5.0.1 * fix: fix queues and ack bugs * Move rabbit messsage processing into ack queue * chore: update readme * chore: optimizations for ack database hits * pushd flowchart * misc: update flowchart * exit dependancy hell * add rocket_impl flag to authifier * make the tests file of delta actually compile * fix: don't silence every push message * fix: don't silence all messages * add debug logging for sending data to rabbit from message events * validate mentions at a server membership level * put back that import that was actually important * minor fix to lockfile * update delta authifier * feat: proper permissions for push notifications * add unit test for mention sanitization * remove local file dependancy on authifier * update ports to proper defaults * fixTM the node bindings * Theoretically configure docker releases for pushd Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * declare exchange in pushd and delta * fix createbuckets script Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * fix: reference db implementation Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * fix: remove finally redundant code Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * fix: changes Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * fix: other changes Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * fix: make channel name return result Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * Add role mention parsing * feat: update to mongo 3.1, add member generator. * integrate mass mentions into pushd * patch redis-rs with updated versions * feat: chunk role mentions * move permission bits to 37/38 to avoid livekit conflict * change role mention format to <%id> * fix the lockfile from merge * fix: PR change requests * feat: add tests * fix: i am a dumbass * fix: tests, again --------- Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * fix: show full branch name on github webhook messages * fix: dont leak invisible presence to others * fix: add back missing early adopter badge * fix: update branch from main * fix: update branch from main * Merge remote-tracking branch 'origin/main' into livekit * feat: private livekit nodes * fix: remove node from channel voice state * fix: get_voice_state has incorrect unique_key and allowed_sources should be lowercase * chore: bump livekit dep * feat: ability to force disconnect existing voice connection * chore: cleanup code * feat: - track call length - move voice and video limits to config - seperate VoiceInformation into model and db model - fix build scripts * fix: move call system message to daemon, check max participants when creating a token to avoid giving tokens but erroring when attempting to join, check if the channel actually supports voice * fix: dont set max participants in livekit * fix: remove VoiceChannel channel type fix: calculate user overwrites correctly fix: dont include personal info in livekit user metadata fix: revoke video permissons on denied publish fix: add video to default permissions * fix: update migration * feat: Send push notifications for dm call start/end * chore: cleanup * feat: allow users to specify who is notified when starting a call * feat: track join time * merge: branch 'main' into feat/livekit * fix: include voice-ingress in build * fix: dont presume channel has a node * chore: add error logging to internal errors * chore: add debug logging to voice ingress * refactor: seperate out disconnect logic * fix: return correct error if user is already in a voice channel * fix: dont break on user not still being in channel and force disconnecting * fix: add Speak and Listen to default permissions * fix: include channel ids in UserMoveVoiceChannel * chore: add temp sentry logging system * fix: handle track_muted and track_unmuted * fix: dont set notification recipients when empty vec is passed * fix: only send UserMoveVoiceChannel to the user * fix: preserve order of replies in message (#447) Signed-off-by: Aeledfyr <aeledfyr@gmail.com> * fix: prevent timing out members which have TimeoutMembers permission * chore: update ci * fix: temporarily disable call started system messages See #457 * fix: update code from review
315 lines
8.5 KiB
TOML
315 lines
8.5 KiB
TOML
production = false
|
|
|
|
[database]
|
|
# MongoDB connection URL
|
|
# Defaults to the container name specified in self-hosted
|
|
mongodb = "mongodb://database"
|
|
# Redis connection URL
|
|
# Defaults to the container name specified in self-hosted
|
|
redis = "redis://redis/"
|
|
|
|
[hosts]
|
|
# Web locations of various services
|
|
# Defaults assume all services are reverse-proxied
|
|
# See https://github.com/revoltchat/self-hosted/blob/master/Caddyfile
|
|
#
|
|
# Remember to change these to https/wss where appropriate in production!
|
|
app = "http://local.revolt.chat"
|
|
api = "http://local.revolt.chat/api"
|
|
events = "ws://local.revolt.chat/ws"
|
|
autumn = "http://local.revolt.chat/autumn"
|
|
january = "http://local.revolt.chat/january"
|
|
voso_legacy = ""
|
|
voso_legacy_ws = ""
|
|
|
|
[hosts.livekit]
|
|
|
|
[rabbit]
|
|
host = "rabbit"
|
|
port = 5672
|
|
username = "rabbituser"
|
|
password = "rabbitpass"
|
|
|
|
[api]
|
|
|
|
[api.registration]
|
|
# Whether an invite should be required for registration
|
|
# See https://github.com/revoltchat/self-hosted#making-your-instance-invite-only
|
|
invite_only = false
|
|
|
|
[api.smtp]
|
|
# Email server configuration for verification
|
|
# Defaults to no email verification (host field is empty)
|
|
host = ""
|
|
username = ""
|
|
password = ""
|
|
from_address = "noreply@example.com"
|
|
# reply_to = "noreply@example.com"
|
|
# port = 587
|
|
# use_tls = true
|
|
|
|
|
|
[api.security]
|
|
# Authifier Shield API key
|
|
authifier_shield_key = ""
|
|
# Legacy voice server management token
|
|
voso_legacy_token = ""
|
|
# Whether services are behind the Cloudflare network
|
|
trust_cloudflare = false
|
|
# easypwned endpoint
|
|
easypwned = ""
|
|
# Tenor API Key
|
|
tenor_key = ""
|
|
|
|
[api.security.captcha]
|
|
# hCaptcha configuration
|
|
hcaptcha_key = ""
|
|
hcaptcha_sitekey = ""
|
|
|
|
[api.workers]
|
|
# Maximum concurrent connections (to proxy server)
|
|
max_concurrent_connections = 50
|
|
|
|
[api.livekit]
|
|
# How long to ring devices for when calling in dms/groups, in seconds
|
|
call_ring_duration = 30
|
|
|
|
[api.livekit.nodes]
|
|
|
|
[api.users]
|
|
|
|
[pushd]
|
|
# this changes the names of the queues to not overlap
|
|
# prod/beta if they happen to be on the same exchange/instance.
|
|
# Usually they have to be, so that messages sent from one or the other get sent to everyone
|
|
production = true
|
|
|
|
# Changes how many users are processed in each chunk when resolving role/everyone mentions.
|
|
# Increasing this will resolve mentions faster, but will consume more memory while resolving.
|
|
mass_mention_chunk_size = 200
|
|
|
|
# none of these should need changing
|
|
exchange = "revolt.notifications"
|
|
message_queue = "notifications.origin.message"
|
|
mass_mention_queue = "notifications.origin.mass_mention" # handles messages that contain role or everyone mentions
|
|
fr_accepted_queue = "notifications.ingest.fr_accepted" # friend request accepted
|
|
fr_received_queue = "notifications.ingest.fr_received" # friend request received
|
|
dm_call_queue = "notifications.ingest.dm_call" # direct message voice call
|
|
generic_queue = "notifications.ingest.generic" # generic messages (title + body)
|
|
ack_queue = "notifications.process.ack" # updates badges for apple devices
|
|
|
|
|
|
[pushd.vapid]
|
|
queue = "notifications.outbound.vapid"
|
|
private_key = "LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSUJSUWpyTWxLRnBiVWhsUHpUbERvcEliYk1yeVNrNXpKYzVYVzIxSjJDS3hvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFWnkrQkg2TGJQZ2hEa3pEempXOG0rUXVPM3pCajRXT1phdkR6ZU00c0pqbmFwd1psTFE0WAp1ZDh2TzVodU94QWhMQlU3WWRldVovWHlBdFpWZmNyQi9BPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo"
|
|
public_key = "BGcvgR-i2z4IQ5Mw841vJvkLjt8wY-FjmWrw83jOLCY52qcGZS0OF7nfLzuYbjsQISwVO2HXrmf18gLWVX3Kwfw="
|
|
|
|
[pushd.fcm]
|
|
queue = "notifications.outbound.fcm"
|
|
key_type = ""
|
|
project_id = ""
|
|
private_key_id = ""
|
|
private_key = ""
|
|
client_email = ""
|
|
client_id = ""
|
|
auth_uri = ""
|
|
token_uri = ""
|
|
auth_provider_x509_cert_url = ""
|
|
client_x509_cert_url = ""
|
|
|
|
[pushd.apn]
|
|
sandbox = false
|
|
queue = "notifications.outbound.apn"
|
|
pkcs8 = ""
|
|
key_id = ""
|
|
team_id = ""
|
|
|
|
|
|
[files]
|
|
# Encryption key for stored files
|
|
# Generate your own key using `openssl rand -base64 32`
|
|
encryption_key = "qcuMA+ssxhMyKaNAKBGFfryfFtUH8NDlamQyDwGW6fU="
|
|
# Quality used for lossy WebP previews (set to 100 for lossless)
|
|
webp_quality = 80.0
|
|
# Mime types that cannot be uploaded or served
|
|
#
|
|
# Example for Windows executables and Android installation files:
|
|
# ["application/vnd.microsoft.portable-executable", "application/vnd.android.package-archive"]
|
|
blocked_mime_types = []
|
|
# ClamAV service
|
|
# hostname:port
|
|
clamd_host = ""
|
|
# Mime types that should be virus scanned
|
|
#
|
|
# Leave empty to scan all file types
|
|
scan_mime_types = [
|
|
"application/vnd.microsoft.portable-executable",
|
|
"application/vnd.android.package-archive",
|
|
"application/zip",
|
|
]
|
|
|
|
[files.limit]
|
|
# Minimum file size (in bytes)
|
|
min_file_size = 1
|
|
# Minimum image resolution
|
|
min_resolution = [1, 1]
|
|
# Maximum MP of images
|
|
max_mega_pixels = 40
|
|
# Maximum pixel side of an image
|
|
max_pixel_side = 10_000
|
|
|
|
[files.preview]
|
|
# Maximum image resolution
|
|
attachments = [1280, 1280]
|
|
avatars = [128, 128]
|
|
backgrounds = [1280, 720]
|
|
icons = [128, 128]
|
|
banners = [480, 480]
|
|
emojis = [128, 128]
|
|
|
|
[files.s3]
|
|
# Configuration for S3
|
|
# Defaults included for MinIO + self-hosted setup
|
|
#
|
|
# Backblaze B2:
|
|
# - endpoint is listed on the "Buckets" page
|
|
# - path_style_buckets is set to true
|
|
# - region is `eu-central-003` string from endpoint URL
|
|
# - access_key_id is keyID generated on the "Application Keys" page
|
|
# - secret_access_key is token generated on the "Application Keys" page
|
|
# - default_bucket matches the name of the bucket you've created
|
|
|
|
# S3 protocol endpoint
|
|
endpoint = "http://minio:9000"
|
|
# Whether to use path-style buckets
|
|
# Generally true, except for MinIO
|
|
path_style_buckets = false
|
|
# S3 region name
|
|
region = "minio"
|
|
# S3 protocol key ID
|
|
access_key_id = "minioautumn"
|
|
# S3 protocol access key
|
|
secret_access_key = "minioautumn"
|
|
default_bucket = "revolt-uploads"
|
|
|
|
|
|
[features]
|
|
# Feature gate options
|
|
webhooks_enabled = false
|
|
# Enable push notifications for mass pings (everyone, online, roles)
|
|
# When false this will still ping in-client but will not send notifications from pushd
|
|
mass_mentions_send_notifications = true
|
|
# Can role/everyone pings be used at all
|
|
mass_mentions_enabled = true
|
|
|
|
[features.limits]
|
|
|
|
[features.limits.global]
|
|
group_size = 100
|
|
message_embeds = 5
|
|
message_replies = 5
|
|
message_reactions = 20
|
|
server_emoji = 100
|
|
server_roles = 200
|
|
server_channels = 200
|
|
|
|
# How many hours since creation a user is considered new
|
|
new_user_hours = 72
|
|
|
|
# Maximum permissible body size in bytes for uploads
|
|
# (should be greater than any one file upload limit)
|
|
body_limit_size = 20_000_000
|
|
|
|
[features.limits.new_user]
|
|
# Limits imposed on new users
|
|
|
|
# Number of outgoing friend requests permitted at any time
|
|
outgoing_friend_requests = 5
|
|
|
|
# Maximum number of owned bots
|
|
bots = 2
|
|
|
|
# Message content length
|
|
message_length = 2000
|
|
|
|
# Number of attachments that can be included
|
|
message_attachments = 5
|
|
|
|
# Maximum number of servers the user can create/join
|
|
servers = 50
|
|
|
|
# Maximum audio frequency (Hz) in voice calls
|
|
voice_quality = 16000
|
|
|
|
# Whether the user can use video streams in voice calls
|
|
video = true
|
|
|
|
# Mamimum resolution (width, height) of video streams in voice calls
|
|
video_resolution = [1080, 720]
|
|
|
|
# Minimum and maximum aspect ratio of video streams in voice calls
|
|
video_aspect_ratio = [0.3, 2.5]
|
|
|
|
[features.limits.new_user.file_upload_size_limit]
|
|
# Maximum file size limits (in bytes)
|
|
attachments = 20_000_000
|
|
avatars = 4_000_000
|
|
backgrounds = 6_000_000
|
|
icons = 2_500_000
|
|
banners = 6_000_000
|
|
emojis = 500_000
|
|
|
|
[features.limits.default]
|
|
# Limits imposed on users by default
|
|
|
|
# Number of outgoing friend requests permitted at any time
|
|
outgoing_friend_requests = 10
|
|
|
|
# Maximum number of owned bots
|
|
bots = 5
|
|
|
|
# Message content length
|
|
message_length = 2000
|
|
|
|
# Number of attachments that can be included
|
|
message_attachments = 5
|
|
|
|
# Maximum number of servers the user can create/join
|
|
servers = 100
|
|
|
|
# Maximum audio frequency (Hz) in voice calls
|
|
voice_quality = 16000
|
|
|
|
# Whether the user can use video streams in voice calls
|
|
video = true
|
|
|
|
# Mamimum resolution (width, height) of video streams in voice calls
|
|
video_resolution = [1080, 720]
|
|
|
|
# Minimum and maximum aspect ratio of video streams in voice calls
|
|
video_aspect_ratio = [0.3, 2.5]
|
|
|
|
[features.limits.default.file_upload_size_limit]
|
|
# Maximum file size limits (in bytes)
|
|
attachments = 20_000_000
|
|
avatars = 4_000_000
|
|
backgrounds = 6_000_000
|
|
icons = 2_500_000
|
|
banners = 6_000_000
|
|
emojis = 500_000
|
|
|
|
[features.advanced]
|
|
# The max amount of messages the rabbitmq provider/db mention adder job will delay for before forcing handling of a channel.
|
|
# default: 5
|
|
process_message_delay_limit = 5
|
|
|
|
[sentry]
|
|
# Configuration for Sentry error reporting
|
|
api = ""
|
|
events = ""
|
|
voice_ingress = ""
|
|
files = ""
|
|
proxy = ""
|
|
pushd = ""
|
|
crond = ""
|
|
gifbox = "" |