Skip to content

Commit

Permalink
fix: support signatory alias for message public key (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian committed Oct 2, 2020
1 parent 7efbad2 commit f20ffc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Utils/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function __construct(object $message)
$this->publicKey = $message->publickey;
} elseif (property_exists($message, 'publicKey')) {
$this->publicKey = $message->publicKey;
} elseif (property_exists($message, 'signatory')) {
$this->publicKey = $message->signatory;
} else {
throw new InvalidArgumentException('The given message did not contain a valid public key.');
}
Expand Down

0 comments on commit f20ffc3

Please sign in to comment.