mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-28 03:17:32 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
931b9735e9 | ||
|
|
8add53f8ab | ||
|
|
50d75bfc8f |
No files matched your search
@@ -23,7 +23,7 @@ repos:
|
|||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
|
|
||||||
- repo: https://github.com/crate-ci/typos
|
- repo: https://github.com/crate-ci/typos
|
||||||
rev: v1.43.4
|
rev: v1.43.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: typos
|
- id: typos
|
||||||
- id: typos
|
- id: typos
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Introduce a resolver command to allow flushing a server from the cache or to flush the complete cache. Contributed by @Omar007
|
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
"message": "Welcome to Continuwuity! Important announcements about the project will appear here."
|
"message": "Welcome to Continuwuity! Important announcements about the project will appear here."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 9,
|
"id": 8,
|
||||||
"mention_room": false,
|
"mention_room": false,
|
||||||
"date": "2026-02-09",
|
"date": "2026-01-12",
|
||||||
"message": "Yesterday we released [v0.5.4](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v0.5.4). Bugfixes, performance improvements and more moderation features! There's also a security fix, so please update as soon as possible. Don't forget to join [our announcements channel](https://matrix.to/#/!jIdNjSM5X-V5JVx2h2kAhUZIIQ08GyzPL55NFZAH1vM/%2489TY9CqRg4-ff1MGo3Ulc5r5X4pakfdzT-99RD8Docc?via=ellis.link&via=explodie.org&via=matrix.org) to get important information sooner <3 "
|
"message": "Hey everyone!\n\nJust letting you know we've released [v0.5.3](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v0.5.3) - this one is a bit of a hotfix for an issue with inviting and allowing others to join rooms.\n\nIf you appreceate the round-the-clock work we've been doing to keep your servers secure over this holiday period, we'd really appreciate your support - you can sponsor individuals on our team using the 'sponsor' button at the top of [our GitHub repository](https://github.com/continuwuity/continuwuity). If you can't do that, even a star helps - spreading the word and advocating for our project helps keep it going.\n\nHave a lovely rest of your year \\\n[Jade \\(she/her\\)](https://matrix.to/#/%40jade%3Aellis.link) \n🩵"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -112,19 +112,6 @@ Query the destinations cache
|
|||||||
|
|
||||||
Query the overrides cache
|
Query the overrides cache
|
||||||
|
|
||||||
### `!admin query resolver flush-cache`
|
|
||||||
|
|
||||||
Flush a given server from the resolver caches or flush them completely
|
|
||||||
|
|
||||||
* Examples:
|
|
||||||
* Flush a specific server:
|
|
||||||
|
|
||||||
`!admin query resolver flush-cache matrix.example.com`
|
|
||||||
|
|
||||||
* Flush all resolver caches completely:
|
|
||||||
|
|
||||||
`!admin query resolver flush-cache --all`
|
|
||||||
|
|
||||||
## `!admin query pusher`
|
## `!admin query pusher`
|
||||||
|
|
||||||
pusher service
|
pusher service
|
||||||
|
|||||||
@@ -20,16 +20,6 @@ log into the server account (`@conduit`) from a web client
|
|||||||
|
|
||||||
## General potential issues
|
## General potential issues
|
||||||
|
|
||||||
### Configuration not working as expected
|
|
||||||
|
|
||||||
Sometimes you can make a mistake in your configuration that
|
|
||||||
means things don't get passed to Continuwuity correctly.
|
|
||||||
This is particularly easy to do with environment variables.
|
|
||||||
To check what configuration Continuwuity actually sees, you can
|
|
||||||
use the `!admin server show-config` command in your admin room.
|
|
||||||
Beware that this prints out any secrets in your configuration,
|
|
||||||
so you might want to delete the result afterwards!
|
|
||||||
|
|
||||||
### Potential DNS issues when using Docker
|
### Potential DNS issues when using Docker
|
||||||
|
|
||||||
Docker's DNS setup for containers in a non-default network intercepts queries to
|
Docker's DNS setup for containers in a non-default network intercepts queries to
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use clap::Subcommand;
|
use clap::Subcommand;
|
||||||
use conduwuit::{Err, Result, utils::time};
|
use conduwuit::{Result, utils::time};
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use ruma::OwnedServerName;
|
use ruma::OwnedServerName;
|
||||||
|
|
||||||
@@ -7,7 +7,6 @@ use crate::{admin_command, admin_command_dispatch};
|
|||||||
|
|
||||||
#[admin_command_dispatch]
|
#[admin_command_dispatch]
|
||||||
#[derive(Debug, Subcommand)]
|
#[derive(Debug, Subcommand)]
|
||||||
#[allow(clippy::enum_variant_names)]
|
|
||||||
/// Resolver service and caches
|
/// Resolver service and caches
|
||||||
pub enum ResolverCommand {
|
pub enum ResolverCommand {
|
||||||
/// Query the destinations cache
|
/// Query the destinations cache
|
||||||
@@ -19,14 +18,6 @@ pub enum ResolverCommand {
|
|||||||
OverridesCache {
|
OverridesCache {
|
||||||
name: Option<String>,
|
name: Option<String>,
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Flush a specific server from the resolver caches or everything
|
|
||||||
FlushCache {
|
|
||||||
name: Option<OwnedServerName>,
|
|
||||||
|
|
||||||
#[arg(short, long)]
|
|
||||||
all: bool,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[admin_command]
|
#[admin_command]
|
||||||
@@ -78,18 +69,3 @@ async fn overrides_cache(&self, server_name: Option<String>) -> Result {
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[admin_command]
|
|
||||||
async fn flush_cache(&self, name: Option<OwnedServerName>, all: bool) -> Result {
|
|
||||||
if all {
|
|
||||||
self.services.resolver.cache.clear().await;
|
|
||||||
writeln!(self, "Resolver caches cleared!").await
|
|
||||||
} else if let Some(name) = name {
|
|
||||||
self.services.resolver.cache.del_destination(&name);
|
|
||||||
self.services.resolver.cache.del_override(&name);
|
|
||||||
self.write_str(&format!("Cleared {name} from resolver caches!"))
|
|
||||||
.await
|
|
||||||
} else {
|
|
||||||
Err!("Missing name. Supply a name or use --all to flush the whole cache.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -406,10 +406,6 @@ impl Service {
|
|||||||
|
|
||||||
/// Checks whether a given user is an admin of this server
|
/// Checks whether a given user is an admin of this server
|
||||||
pub async fn user_is_admin(&self, user_id: &UserId) -> bool {
|
pub async fn user_is_admin(&self, user_id: &UserId) -> bool {
|
||||||
if self.services.globals.server_user == user_id {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if self
|
if self
|
||||||
.services
|
.services
|
||||||
.server
|
.server
|
||||||
|
|||||||
Reference in new issue
Block a user