Merge branch 'master' into PLT-1429

This commit is contained in:
=Corey Hulen
2016-01-14 09:08:13 -06:00
104 changed files with 1941 additions and 848 deletions

View File

@@ -603,7 +603,14 @@ func (s SqlChannelStore) GetExtraMembers(channelId string, limit int) StoreChann
result := StoreResult{}
var members []model.ExtraMember
_, err := s.GetReplica().Select(&members, "SELECT Id, Nickname, Email, ChannelMembers.Roles, Username FROM ChannelMembers, Users WHERE ChannelMembers.UserId = Users.Id AND ChannelId = :ChannelId LIMIT :Limit", map[string]interface{}{"ChannelId": channelId, "Limit": limit})
var err error
if limit != -1 {
_, err = s.GetReplica().Select(&members, "SELECT Id, Nickname, Email, ChannelMembers.Roles, Username FROM ChannelMembers, Users WHERE ChannelMembers.UserId = Users.Id AND ChannelId = :ChannelId LIMIT :Limit", map[string]interface{}{"ChannelId": channelId, "Limit": limit})
} else {
_, err = s.GetReplica().Select(&members, "SELECT Id, Nickname, Email, ChannelMembers.Roles, Username FROM ChannelMembers, Users WHERE ChannelMembers.UserId = Users.Id AND ChannelId = :ChannelId", map[string]interface{}{"ChannelId": channelId})
}
if err != nil {
result.Err = model.NewAppError("SqlChannelStore.GetExtraMembers", "We couldn't get the extra info for channel members", "channel_id="+channelId+", "+err.Error())
} else {

View File

@@ -4,7 +4,7 @@
package store
import (
l4g "code.google.com/p/log4go"
l4g "github.com/alecthomas/log4go"
"github.com/go-gorp/gorp"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"

View File

@@ -4,7 +4,7 @@
package store
import (
l4g "code.google.com/p/log4go"
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/model"
)

View File

@@ -4,7 +4,6 @@
package store
import (
l4g "code.google.com/p/log4go"
"crypto/aes"
"crypto/cipher"
"crypto/hmac"
@@ -16,6 +15,7 @@ import (
"encoding/json"
"errors"
"fmt"
l4g "github.com/alecthomas/log4go"
"io"
sqltrace "log"
"math/rand"

View File

@@ -4,7 +4,7 @@
package store
import (
l4g "code.google.com/p/log4go"
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/model"
"time"
)