Skip to content

Commit

Permalink
chore: Update dependency (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 authored Oct 6, 2023
1 parent 2ae7f38 commit 15c125a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ either = "1"
void = "1"

#ipfs dependency
rust-ipfs = "0.4.6"
rust-ipfs = "0.5.0"

# Blink related crates
# av-data is needed to use libaom. need to ensure that Warp and libaom use the same version of av-data
Expand Down
2 changes: 1 addition & 1 deletion extensions/warp-ipfs/src/store/document/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub async fn unixfs_fetch(
let fut = async {
let stream = ipfs
.unixfs()
.cat(IpfsPath::from(cid), None, &[], local)
.cat(IpfsPath::from(cid), None, &[], local, None)
.await
.map_err(anyhow::Error::from)?;

Expand Down
2 changes: 1 addition & 1 deletion extensions/warp-ipfs/src/store/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl FileStore {
let mut index_stream = self
.ipfs
.unixfs()
.cat(IpfsPath::from(cid), None, &[], true)
.cat(IpfsPath::from(cid), None, &[], true, None)
.await
.map_err(anyhow::Error::from)?
.boxed();
Expand Down
6 changes: 4 additions & 2 deletions extensions/warp-ipfs/src/store/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@ impl IdentityStore {
None,
&[],
false,
None,
)
.await?
.boxed();
Expand Down Expand Up @@ -1163,6 +1164,7 @@ impl IdentityStore {
None,
&[],
false,
None,
)
.await?
.boxed();
Expand Down Expand Up @@ -1263,7 +1265,7 @@ impl IdentityStore {
async move {
let mut stream = ipfs
.unixfs()
.cat(picture, None, &[], false)
.cat(picture, None, &[], false, None)
.await?
.boxed();

Expand Down Expand Up @@ -1291,7 +1293,7 @@ impl IdentityStore {
async move {
let mut stream = ipfs
.unixfs()
.cat(banner, None, &[], false)
.cat(banner, None, &[], false, None)
.await?
.boxed();
while let Some(_d) = stream.next().await {
Expand Down
15 changes: 7 additions & 8 deletions extensions/warp-ipfs/src/store/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3487,8 +3487,13 @@ impl MessageStore {

let ipfs = self.ipfs.clone();
let _constellation = constellation.clone();

let progress_stream = async_stream::stream! {
yield Progression::CurrentProgress {
name: attachment.name(),
current: 0,
total: Some(attachment.size()),
};

let stream = match ipfs.get_unixfs(reference, &path).await {
Ok(stream) => stream,
Err(e) => {
Expand All @@ -3498,13 +3503,7 @@ impl MessageStore {
error: Some(e.to_string()),
};
return;
}
};

yield Progression::CurrentProgress {
name: attachment.name(),
current: 0,
total: Some(attachment.size()),
},
};

for await event in stream {
Expand Down

0 comments on commit 15c125a

Please sign in to comment.