Этот коммит содержится в:
Joram Wilander
2017-03-20 10:12:43 -04:00
коммит произвёл GitHub
родитель 1ef071af6b
Коммит dcdea9b54c
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@@ -535,7 +535,7 @@ func addChannelMember(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
if cm, err := app.AddChannelMember(member.UserId, channel, c.Session.UserId); err != nil {
if cm, err := app.AddChannelMember(member.UserId, channel, c.Session.UserId, c.GetSiteURL()); err != nil {
c.Err = err
return
} else {

Просмотреть файл

@@ -446,7 +446,7 @@ func AddUserToChannel(user *model.User, channel *model.Channel) (*model.ChannelM
return newMember, nil
}
func AddChannelMember(userId string, channel *model.Channel, userRequestorId string) (*model.ChannelMember, *model.AppError) {
func AddChannelMember(userId string, channel *model.Channel, userRequestorId, siteURL string) (*model.ChannelMember, *model.AppError) {
var user *model.User
var err *model.AppError
@@ -464,7 +464,7 @@ func AddChannelMember(userId string, channel *model.Channel, userRequestorId str
return nil, err
}
go PostAddToChannelMessage(userRequestor, user, channel)
go PostAddToChannelMessage(userRequestor, user, channel, siteURL)
UpdateChannelLastViewedAt([]string{channel.Id}, userRequestor.Id)