Changing the way we mattermost handles URLs. team.domain.com becomes domain.com/team.
Renaming team.Name to team.DisplayName and team.Domain to team.Name. So: team.Name -> url safe name. team.DisplayName -> nice name for users
Этот коммит содержится в:
@@ -17,13 +17,13 @@ func TestSocket(t *testing.T) {
|
||||
Setup()
|
||||
|
||||
url := "ws://localhost:" + utils.Cfg.ServiceSettings.Port + "/api/v1/websocket"
|
||||
team := &model.Team{Name: "Name", Domain: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
|
||||
team := &model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
|
||||
team = Client.Must(Client.CreateTeam(team)).Data.(*model.Team)
|
||||
|
||||
user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey@test.com", Nickname: "Corey Hulen", Password: "pwd"}
|
||||
user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User)
|
||||
store.Must(Srv.Store.User().VerifyEmail(user1.Id))
|
||||
Client.LoginByEmail(team.Domain, user1.Email, "pwd")
|
||||
Client.LoginByEmail(team.Name, user1.Email, "pwd")
|
||||
|
||||
channel1 := &model.Channel{DisplayName: "Test Web Scoket 1", Name: "a" + model.NewId() + "a", Type: model.CHANNEL_OPEN, TeamId: team.Id}
|
||||
channel1 = Client.Must(Client.CreateChannel(channel1)).Data.(*model.Channel)
|
||||
@@ -42,7 +42,7 @@ func TestSocket(t *testing.T) {
|
||||
user2 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey@test.com", Nickname: "Corey Hulen", Password: "pwd"}
|
||||
user2 = Client.Must(Client.CreateUser(user2, "")).Data.(*model.User)
|
||||
store.Must(Srv.Store.User().VerifyEmail(user2.Id))
|
||||
Client.LoginByEmail(team.Domain, user2.Email, "pwd")
|
||||
Client.LoginByEmail(team.Name, user2.Email, "pwd")
|
||||
|
||||
header2 := http.Header{}
|
||||
header2.Set(model.HEADER_AUTH, "BEARER "+Client.AuthToken)
|
||||
|
||||
Ссылка в новой задаче
Block a user