Porting MatrixHttpApi

This commit is contained in:
Yoann Celton 2018-11-30 10:23:48 +11:00
commit 3e75a76d24
3 changed files with 1217 additions and 29 deletions

File diff suppressed because it is too large Load diff

View file

@ -37,4 +37,10 @@ class Util {
throw new ValidationException("UserIDs must have a domain component, seperated by a :");
}
}
public static function checkMxcUrl(string $mxcUrl) {
if (substr($mxcUrl, 0, 6) != 'mxc://') {
throw new ValidationException('MXC URL did not begin with \'mxc://\'');
}
}
}