Skip to content

Commit

Permalink
Fix pinning
Browse files Browse the repository at this point in the history
  • Loading branch information
MHHukiewitz committed Dec 20, 2023
1 parent 942674c commit 8b5fe5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/messages/store/pin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function Pin(spc: StorePinConfiguration): Promise<StoreMessage> {
channel: spc.channel,
fileHash: spc.fileHash,
APIServer: spc.APIServer || DEFAULT_API_V2,
inlineRequested: false,
inlineRequested: true,
storageEngine: ItemType.ipfs,
});
}
6 changes: 3 additions & 3 deletions src/messages/store/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async function getHash(buffer: Buffer, storageEngine: ItemType, fileHash: string
async function createAndSendStoreMessage(
account: Account,
channel: string,
myHash: string,
fileHash: string,
storageEngine: ItemType,
APIServer: string,
inlineRequested: boolean,
Expand All @@ -109,7 +109,7 @@ async function createAndSendStoreMessage(
const storeContent: StoreContent = {
address: account.address,
item_type: storageEngine,
item_hash: myHash,
item_hash: fileHash,
time: timestamp,
};

Expand All @@ -129,7 +129,7 @@ async function createAndSendStoreMessage(
APIServer,
});

if (ItemType.ipfs == message.item_type) {
if (ItemType.ipfs == message.item_type || inlineRequested) {
await SignAndBroadcast({
message: message,
account,
Expand Down

0 comments on commit 8b5fe5c

Please sign in to comment.