diff --git a/src/server/datahub/generated-mutation.ts b/src/server/datahub/generated-mutation.ts index 2f5e04aba..1ac5720b6 100644 --- a/src/server/datahub/generated-mutation.ts +++ b/src/server/datahub/generated-mutation.ts @@ -34,6 +34,7 @@ export type CreatePostOffChainInput = { callData?: InputMaybe content?: InputMaybe dataType: SocialEventDataType + protVersion?: InputMaybe providerAddr: Scalars['String']['input'] sig: Scalars['String']['input'] } diff --git a/src/services/subsocial/datahub/posts/mutation.ts b/src/services/subsocial/datahub/posts/mutation.ts index 67b27625a..f1a05a4c1 100644 --- a/src/services/subsocial/datahub/posts/mutation.ts +++ b/src/services/subsocial/datahub/posts/mutation.ts @@ -7,6 +7,7 @@ import { socialCallName, SocialEventDataApiInput, SocialEventDataType, + socialEventProtVersion, SynthCreatePostTxFailedCallParsedArgs, SynthCreatePostTxRetryCallParsedArgs, SynthUpdatePostTxFailedCallParsedArgs, @@ -51,7 +52,9 @@ async function createPostData({ ipfsSrc: cid, } + // TODO: refactor input to reduce duplication with other inputs const input: SocialEventDataApiInput = { + protVersion: socialEventProtVersion['0.1'], dataType: SocialEventDataType.optimistic, callData: { name: socialCallName.create_post, @@ -91,6 +94,7 @@ async function updatePostData({ } const input: SocialEventDataApiInput = { + protVersion: socialEventProtVersion['0.1'], dataType: SocialEventDataType.optimistic, callData: { name: socialCallName.update_post, @@ -150,6 +154,7 @@ async function notifyCreatePostFailedOrRetryStatus({ } const input: SocialEventDataApiInput = { + protVersion: socialEventProtVersion['0.1'], dataType: SocialEventDataType.offChain, callData: { name: event.name, @@ -213,6 +218,7 @@ async function notifyUpdatePostFailedOrRetryStatus({ } const input: SocialEventDataApiInput = { + protVersion: socialEventProtVersion['0.1'], dataType: SocialEventDataType.offChain, callData: { name: event.name, diff --git a/yarn.lock b/yarn.lock index 15dc5f42b..fac58946e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6582,7 +6582,7 @@ "@subsocial/data-hub-sdk@dappforce/subsocial-data-hub-sdk#staging": version "0.0.2" - resolved "https://codeload.github.com/dappforce/subsocial-data-hub-sdk/tar.gz/ea6cb03324f874d48db89158c5029dd37a7ff7e4" + resolved "https://codeload.github.com/dappforce/subsocial-data-hub-sdk/tar.gz/9c7856aa4a457428ddf4c810b18551d1799384c1" dependencies: "@subsocial/api" "^0.8.13" "@swc/core" "^1.3.55"