From e85b6e919002682b6b85f96f9cd7766d7d450fee Mon Sep 17 00:00:00 2001 From: mhh Date: Wed, 20 Dec 2023 18:29:51 +0100 Subject: [PATCH] Fix pinning --- src/messages/store/pin.ts | 2 +- src/messages/store/publish.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/messages/store/pin.ts b/src/messages/store/pin.ts index 9efe7938..59b34353 100644 --- a/src/messages/store/pin.ts +++ b/src/messages/store/pin.ts @@ -36,7 +36,7 @@ export async function Pin(spc: StorePinConfiguration): Promise { channel: spc.channel, fileHash: spc.fileHash, APIServer: spc.APIServer || DEFAULT_API_V2, - inlineRequested: false, + inlineRequested: true, storageEngine: ItemType.ipfs, }); } diff --git a/src/messages/store/publish.ts b/src/messages/store/publish.ts index 1309ca1c..c16cdd6c 100644 --- a/src/messages/store/publish.ts +++ b/src/messages/store/publish.ts @@ -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, @@ -109,7 +109,7 @@ async function createAndSendStoreMessage( const storeContent: StoreContent = { address: account.address, item_type: storageEngine, - item_hash: myHash, + item_hash: fileHash, time: timestamp, }; @@ -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,