[bugfix] Don't call strings.ToLower() on usernames when selecting account by domain+username (#1190)

* don't lowercase account username when doing a select

* test getting remote user with uppercase username
This commit is contained in:
tobi
2022-11-30 17:44:02 +01:00
committed by GitHub
parent 8d581deb28
commit 3a11861ac6
9 changed files with 47 additions and 32 deletions

View File

@@ -56,7 +56,7 @@ func (suite *FollowRequestTestSuite) TestFollowRequestAccept() {
suite.NoError(errWithCode)
suite.EqualValues(&apimodel.Relationship{ID: "01FHMQX3GAABWSM0S2VZEC2SWC", Following: false, ShowingReblogs: false, Notifying: false, FollowedBy: true, Blocking: false, BlockedBy: false, Muting: false, MutingNotifications: false, Requested: false, DomainBlocking: false, Endorsed: false, Note: ""}, relationship)
// accept should be sent to some_user
// accept should be sent to Some_User
var sent [][]byte
if !testrig.WaitFor(func() bool {
sentI, ok := suite.httpClient.SentMessages.Load(requestingAccount.InboxURI)
@@ -119,7 +119,7 @@ func (suite *FollowRequestTestSuite) TestFollowRequestReject() {
suite.NoError(errWithCode)
suite.EqualValues(&apimodel.Relationship{ID: "01FHMQX3GAABWSM0S2VZEC2SWC", Following: false, ShowingReblogs: false, Notifying: false, FollowedBy: false, Blocking: false, BlockedBy: false, Muting: false, MutingNotifications: false, Requested: false, DomainBlocking: false, Endorsed: false, Note: ""}, relationship)
// reject should be sent to some_user
// reject should be sent to Some_User
var sent [][]byte
if !testrig.WaitFor(func() bool {
sentI, ok := suite.httpClient.SentMessages.Load(requestingAccount.InboxURI)