summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
authorMartin Kraft <martinkraft@gmail.com>2018-04-24 10:21:18 -0400
committerMartin Kraft <martinkraft@gmail.com>2018-04-24 10:21:18 -0400
commit7294644e9d74ca1512a730c597d61a97ccbcf10c (patch)
tree36cad0e1782b2e6bc06aab3e7afc54d45579d271 /app/channel.go
parentcd55c44c8fd8f61cdb7cbfb57a588be82c7aa0ab (diff)
parent3224d2f6a3bd95293fff25d6cc417b30b4f6e334 (diff)
downloadchat-7294644e9d74ca1512a730c597d61a97ccbcf10c.tar.gz
chat-7294644e9d74ca1512a730c597d61a97ccbcf10c.tar.bz2
chat-7294644e9d74ca1512a730c597d61a97ccbcf10c.zip
Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/app/channel.go b/app/channel.go
index c63023fb3..9a8f66fc7 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -881,34 +881,6 @@ func (a *App) PostUpdateChannelDisplayNameMessage(userId string, channel *model.
return nil
}
-func (a *App) PostConvertChannelToPrivate(userId string, channel *model.Channel) *model.AppError {
- uc := a.Srv.Store.User().Get(userId)
-
- if uresult := <-uc; uresult.Err != nil {
- return model.NewAppError("PostConvertChannelToPrivate", "api.channel.post_convert_channel_to_private.retrieve_user.error", nil, uresult.Err.Error(), http.StatusBadRequest)
- } else {
- user := uresult.Data.(*model.User)
-
- message := fmt.Sprintf(utils.T("api.channel.post_convert_channel_to_private.updated_from"), user.Username)
-
- post := &model.Post{
- ChannelId: channel.Id,
- Message: message,
- Type: model.POST_CONVERT_CHANNEL,
- UserId: userId,
- Props: model.StringInterface{
- "username": user.Username,
- },
- }
-
- if _, err := a.CreatePost(post, channel, false); err != nil {
- return model.NewAppError("PostConvertChannelToPrivate", "api.channel.post_convert_channel_to_private.create_post.error", nil, err.Error(), http.StatusInternalServerError)
- }
- }
-
- return nil
-}
-
func (a *App) GetChannel(channelId string) (*model.Channel, *model.AppError) {
if result := <-a.Srv.Store.Channel().Get(channelId, true); result.Err != nil && result.Err.Id == "store.sql_channel.get.existing.app_error" {
result.Err.StatusCode = http.StatusNotFound