Skip to content

Commit 4f42f4c

Browse files
committed
chore: include empty list if key is included
1 parent a5dfd4d commit 4f42f4c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

extensions/warp-ipfs/src/store/payload.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl<M: Serialize + DeserializeOwned + Clone> PayloadMessage<M> {
219219
co_signature: None,
220220
};
221221

222-
if !recipients.is_empty() {
222+
if !recipients.is_empty() || key.is_some() {
223223
let keypair = cosigner.unwrap_or(keypair);
224224
let new_key = generate::<64>();
225225

@@ -244,10 +244,6 @@ impl<M: Serialize + DeserializeOwned + Clone> PayloadMessage<M> {
244244
new_map.insert(recipient, key_set);
245245
}
246246

247-
if new_map.is_empty() {
248-
return Err(Error::EmptyMessage); // TODO: error for arb message being empty
249-
}
250-
251247
let sender = payload.sender();
252248

253249
// Although we could decrypt any of the keys above, we will have an entry for the sender

0 commit comments

Comments
 (0)