Skip to content

Commit

Permalink
re-added reverted content
Browse files Browse the repository at this point in the history
  • Loading branch information
noumantahir authored and gamingumar committed Oct 25, 2023
1 parent 24e8b18 commit 8f0fba7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/quickReplyModal/usePostSubmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ export const usePostSubmitter = () => {

//adding jsonmeta with image ratios here....
const meta = await extractMetadata({
body:commentBody,
fetchRatios:true
body: commentBody,
fetchRatios: true,
postType
})
const jsonMetadata = makeJsonMetadata(meta, parentTags || ['ecency'])

Expand Down Expand Up @@ -147,7 +148,7 @@ export const usePostSubmitter = () => {
const _wavesHost = 'ecency.waves' //TODO: make waves host selection dynamic
const latestWavesPost = await wavesQueries.fetchLatestWavesContainer(_wavesHost);

const _cacheCommentData = await _submitReply(body, latestWavesPost)
const _cacheCommentData = await _submitReply(body, latestWavesPost, PostTypes.WAVE)

if (_cacheCommentData) {
pusblishWaveMutation.mutate(_cacheCommentData)
Expand Down
2 changes: 2 additions & 0 deletions src/utils/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,12 @@ export const extractMetadata = async ({
body,
thumbUrl,
fetchRatios,
postType,
}: {
body: string;
thumbUrl?: string;
fetchRatios?: boolean;
postType?: PostTypes;
}) => {
// NOTE: keepting regex to extract usernames as reference for later usage if any
// const userReg = /(^|\s)(@[a-z][-.a-z\d]+[a-z\d])/gim;
Expand Down

0 comments on commit 8f0fba7

Please sign in to comment.