From 9607eee19fcd75cf5720a938e1e05a805bcf109c Mon Sep 17 00:00:00 2001 From: noumantahir Date: Fri, 18 Feb 2022 22:41:12 +0500 Subject: [PATCH] converting permlink to lower case before fetching post --- src/providers/hive/dhive.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/providers/hive/dhive.js b/src/providers/hive/dhive.js index d3aa95ac3..8f4255355 100644 --- a/src/providers/hive/dhive.js +++ b/src/providers/hive/dhive.js @@ -591,6 +591,8 @@ export const getRepliesByLastUpdate = async (query) => { }; export const getPost = async (author, permlink, currentUserName = null, isPromoted = false) => { + author = author && author.toLowerCase(); + permlink = permlink && permlink.toLowerCase(); try { console.log('Getting post: ', author, permlink); const post = await client.call('bridge', 'get_post', { author, permlink }); @@ -601,6 +603,8 @@ export const getPost = async (author, permlink, currentUserName = null, isPromot }; export const isPostAvailable = async (author, permlink) => { + author = author && author.toLowerCase(); + permlink = permlink && permlink.toLowerCase(); try { const post = await client.call('bridge', 'get_post', { author, permlink }); return get(post, 'post_id', 0) !== 0; @@ -610,6 +614,8 @@ export const isPostAvailable = async (author, permlink) => { }; export const getPurePost = async (author, permlink) => { + author = author && author.toLowerCase(); + permlink = permlink && permlink.toLowerCase(); try { return await client.call('bridge', 'get_post', { author, permlink }); } catch (error) {