Compare commits
2 commits
5a57fd69b9
...
b6a17184eb
Author | SHA1 | Date | |
---|---|---|---|
b6a17184eb | |||
6129973b13 |
2 changed files with 2 additions and 0 deletions
|
@ -99,6 +99,7 @@ impl<T : super::Base> Node<T> {
|
|||
}
|
||||
|
||||
/// returns id of object: url for link, id for object, None if empty or array
|
||||
// TODO return Option<&str> and avoid inner clone
|
||||
pub fn id(&self) -> Option<String> {
|
||||
match self {
|
||||
Node::Empty => None,
|
||||
|
|
|
@ -115,6 +115,7 @@ where
|
|||
|
||||
// TODO assert payload's digest is equal to signature's
|
||||
let user_id = http_signature.key_id
|
||||
.replace("/main-key", "") // gotosocial whyyyyy
|
||||
.split('#')
|
||||
.next().ok_or(UpubError::bad_request())?
|
||||
.to_string();
|
||||
|
|
Loading…
Reference in a new issue