SteemJ - Fix to allow comments on Account with names containing a dot

in #utopian-io7 years ago (edited)

We are using SteemJ for the SteemitWorldMap project and we recently found out that some comments are failing on user contaning a dot in the account name.

This led to some investigation in the SteemJ source code.
After some digging I found that issue comes from the generated permlink for the reply. Indeed, it is using the author account name to build the permlink therefore but this character is invalid in permlinks.

Looking at the condenser implementation I saw that is was removing the dot is such cases.
I implemented the same behavior in this PR. This should be the only character to remove since account names can only contain alphanumerical characters (which are valid) plus dot (which is not).

On the practical level, the fix is quite easy, it just remove the dot, if any, from the author name in the function that builds the permlink.

This has been tested successfully and the patched version is now powering SteemitWorldMap. The Pull Request was kindly merged by @dez1337 who is maintaining the SteemJ project.

Proof of work

image.png

Thank you for your interest!



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Again, thanks for helping out making Steemitworldmap better and better!

Sure ! @deez1337 and its @steemj project definitely helped to focus on business code :-D

I didn't know about @steemitworldmap, it looks very good. Thanks for sharing and for your contributions to the project.

Glad you like it :-D More is comming !

Congratulations @oroger! You have received a personal award!

1 Year on Steemit
Click on the badge to view your own Board of Honor on SteemitBoard.

Upvote this notificationto to help all Steemit users. Learn why here!

Hey @oroger I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Thank you for the contribution. It has been approved.

Bug fixes are always quite easy in hindsight - but finding them and fixing them without causing more damage takes time and patience. Great work!

You can contact us on Discord.
[utopian-moderator]

Hehe that's true :-)
Thanks !

Great job dear friend we appreciate your efforts here thank you

Congratulations @oroger! You have received a personal award!

SteemFest 3 Attendee
Click on the badge to view your Board of Honor.

Do not miss the last post from @steemitboard:

SteemFest³ - SteemitBoard Contest Teaser
The new Steemfest³ Award is ready!

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @oroger! You received a personal award!

Thank you for your participation in the "Meet The Steemians" contest in Kraków. We hope you enjoyed it and made lots of new friends. See you at SteemFest4!

Click here to view your Board of Honor

Do not miss the last post from @steemitboard:

Meet the Steemians Contest - The results, the winners and the prizes
Meet the Steemians Contest - Special attendees revealed
Meet the Steemians Contest - Intermediate results

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @oroger! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

New japanese speaking community Steem Meetup badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!