Skip to content

Fixes cosmetic issue where the karma message target should match the … - #278

Open
jottinger wants to merge 2 commits into
masterfrom
277-karma-cosmetic-issues
Open

Fixes cosmetic issue where the karma message target should match the …#278
jottinger wants to merge 2 commits into
masterfrom
277-karma-cosmetic-issues

Conversation

@jottinger

Copy link
Copy Markdown
Collaborator

…requested target

i.e., "~karma FoO" should say "FoO has karma 0" and not the normalized "foo has karma 0"

…requested target

i.e., "~karma FoO" should say "FoO has karma 0" and not the normalized "foo has karma 0"
@jottinger
jottinger requested a review from evanchooly May 19, 2020 11:46
increment = false
}
var karma: Karma? = dao.find(nick)
var karma: Karma? = dao.find(nick.toLowerCase())

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this search is already case insensitive. it, in fact, upper cases the name before querying.

if (karma == null) {
karma = Karma()
karma.name = nick
karma.name = nick.toLowerCase()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also feels unnecessary

val nick = message.substring("karma ".length).toLowerCase()
val karma = dao.find(nick)
val nick = message.substring("karma ".length)
val normalizedNick=nick.toLowerCase()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto. the search already ignores case. lowercasing it is redundant. ( i know it was that way before but it was wrong then, too)

@evanchooly

Copy link
Copy Markdown
Owner

@dependabot recreate

1 similar comment
@evanchooly

Copy link
Copy Markdown
Owner

@dependabot recreate

@jottinger

Copy link
Copy Markdown
Collaborator Author

This has been updated, but I can't build it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants