Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dot in account name when building the permlink for comments #184

Merged
merged 1 commit into from
Jan 1, 2018

Conversation

oroger
Copy link
Contributor

@oroger oroger commented Dec 30, 2017

Hello This is my first contribution to SteemJ, small one.

We are using SteemJ for SteemitWorldMap. We recently found out that autocomment are failing on user contaning a dot in the account name.

This issue is that the generated permlink for the reply also contains a dot character, rendering it invalid by the permlink validator.

Form what I see in the condenser interface, it is removing the dot character. I implemented the same behavior in this PR. This should be the only character to removing since account names can only contain alphanumerical characters + dot.

Here is a simple test to reproduce the issue :

	@Test
	public void comment() throws Exception {
		new SteemJ().createComment(new AccountName("malik.roxane"), new Permlink("colorchallenge-make-it-like-a-sunflower"), "SteemJ test", new String[]{ "test", "steemj" });
	}

As you can see here, applying this pull request fixes the issue and allows the comment as expected.

This is necessary to avoid generating invalid permlinks (the dot character is apparently invalid - condenser is also removing it).
@marvin-we marvin-we added this to the 0.4.4 milestone Dec 31, 2017
@marvin-we marvin-we added the bug label Dec 31, 2017
@marvin-we marvin-we merged commit 126c907 into marvin-we:master Jan 1, 2018
@marvin-we
Copy link
Owner

Hay @oroger and thank you for using SteemJ to realize your project =)

I really appreciate your PullRequest <3 As a tip: You may want to get rewarded for this using https://utopian.io which is also sponsored a little bit by SteemJ 👍

Best regards!

@marvin-we marvin-we modified the milestones: 0.4.4, 0.5.0 Jan 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants