Moved ChannelMember.NotifyLevel into ChannelMember.NotifyProps

Этот коммит содержится в:
hmhealey
2015-09-30 12:28:28 -04:00
родитель c16b9de8dc
Коммит c9a0030551
13 изменённых файлов: 31 добавлений и 233 удалений

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

@@ -78,8 +78,7 @@ func (s SqlChannelStore) UpgradeSchemaIfNeeded() {
l4g.Error(err.Error())
}
// TODO uncomment me
// s.RemoveColumnIfExists("ChannelMembers", "NotifyLevel")
s.RemoveColumnIfExists("ChannelMembers", "NotifyLevel")
}
}
@@ -721,36 +720,6 @@ func (s SqlChannelStore) IncrementMentionCount(channelId string, userId string)
return storeChannel
}
// TODO remove me
func (s SqlChannelStore) UpdateNotifyLevel(channelId, userId, notifyLevel string) StoreChannel {
storeChannel := make(StoreChannel)
go func() {
result := StoreResult{}
updateAt := model.GetMillis()
_, err := s.GetMaster().Exec(
`UPDATE
ChannelMembers
SET
NotifyLevel = :NotifyLevel,
LastUpdateAt = :LastUpdateAt
WHERE
UserId = :UserId
AND ChannelId = :ChannelId`,
map[string]interface{}{"ChannelId": channelId, "UserId": userId, "NotifyLevel": notifyLevel, "LastUpdateAt": updateAt})
if err != nil {
result.Err = model.NewAppError("SqlChannelStore.UpdateNotifyLevel", "We couldn't update the notify level", "channel_id="+channelId+", user_id="+userId+", "+err.Error())
}
storeChannel <- result
close(storeChannel)
}()
return storeChannel
}
func (s SqlChannelStore) GetForExport(teamId string) StoreChannel {
storeChannel := make(StoreChannel)