Don't retry for PublicKeyNotFound
We only return `nil` when we know the person, but don't know the key or the key is invalid, so it doesn't make sense to retry in this case. When the person isn't known and can't be fetched we raise a DiscoveryError which will be retried. Also the errors were moved to the `Signable` module in the last release. closes #7717
This commit is contained in:
parent
602a1dcd55
commit
f0aca56c8f
3 changed files with 4 additions and 2 deletions
|
|
@ -7,6 +7,7 @@
|
|||
## Bug fixes
|
||||
* Prevent duplicate mention notifications when the post is received twice [#7721](https://github.com/diaspora/diaspora/pull/7721)
|
||||
* Fixed a compatiblitiy issue with non-diaspora\* webfingers [#7718](https://github.com/diaspora/diaspora/pull/7718)
|
||||
* Don't retry federation for accounts without a valid public key [#7717](https://github.com/diaspora/diaspora/pull/7717)
|
||||
|
||||
## Features
|
||||
* Add basic html5 audio/video embedding support [#6418](https://github.com/diaspora/diaspora/pull/6418)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ module Workers
|
|||
DiasporaFederation::Parsers::BaseParser::InvalidRootNode,
|
||||
DiasporaFederation::Entity::InvalidEntityName,
|
||||
DiasporaFederation::Entity::UnknownEntity,
|
||||
DiasporaFederation::Entities::Relayable::SignatureVerificationFailed,
|
||||
DiasporaFederation::Entities::Signable::PublicKeyNotFound,
|
||||
DiasporaFederation::Entities::Signable::SignatureVerificationFailed,
|
||||
DiasporaFederation::Entities::Participation::ParentNotLocal,
|
||||
DiasporaFederation::Federation::Receiver::InvalidSender,
|
||||
DiasporaFederation::Federation::Receiver::NotPublic,
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ describe "diaspora federation callbacks" do
|
|||
expect(key.to_s).to eq(person.serialized_public_key)
|
||||
end
|
||||
|
||||
it "returns nil for an unknown person" do
|
||||
it "forwards the DiscoveryError when the person can't be fetched" do
|
||||
diaspora_id = Fabricate.sequence(:diaspora_id)
|
||||
expect(Person).to receive(:find_or_fetch_by_identifier).with(diaspora_id)
|
||||
.and_raise(DiasporaFederation::Discovery::DiscoveryError)
|
||||
|
|
|
|||
Loading…
Reference in a new issue