mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 20:26:52 +00:00
fix: appservice masquerading requirement check
This commit is contained in:
1 parent
7fac885a98
commit
6aab456466
1 file changed
+3
-2
@@ -60,8 +60,9 @@ impl ClientIdentity {
|
||||
|
||||
pub(crate) fn expect_sender_device(&self) -> Result<&DeviceId> {
|
||||
match self {
|
||||
| Self::User { sender_device, .. } => Ok(sender_device),
|
||||
| Self::Appservice { .. } =>
|
||||
| Self::User { sender_device, .. }
|
||||
| Self::Appservice { sender_device: Some(sender_device), .. } => Ok(sender_device),
|
||||
| Self::Appservice { sender_device: None, .. } =>
|
||||
Err!(Request(Forbidden("Appservices must masquerade to use this endpoint."))),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user