mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 14:51:18 +00:00
Nutomic
b96ce81f89
* Remove dependency of apub_lib on LemmyContext * Move ApubObject trait to library * Reorganize files in apub lib * Move ActorType, signatures, activity_queue to apub library
17 lines
379 B
Rust
17 lines
379 B
Rust
use activitystreams::error::DomainError;
|
|
use lemmy_utils::LemmyError;
|
|
use url::Url;
|
|
|
|
pub fn verify_domains_match(a: &Url, b: &Url) -> Result<(), LemmyError> {
|
|
if a.domain() != b.domain() {
|
|
return Err(DomainError.into());
|
|
}
|
|
Ok(())
|
|
}
|
|
|
|
pub fn verify_urls_match(a: &Url, b: &Url) -> Result<(), LemmyError> {
|
|
if a != b {
|
|
return Err(DomainError.into());
|
|
}
|
|
Ok(())
|
|
}
|