mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 19:33:09 -06:00
fixed goimports error
This commit is contained in:
parent
1b57af7dc5
commit
32827f01c6
|
|
@ -135,13 +135,12 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *authtype
|
||||||
func (rp *RequestPool) currentSyncForUser(req syncRequest, latestPos types.PaginationToken) (res *types.Response, err error) {
|
func (rp *RequestPool) currentSyncForUser(req syncRequest, latestPos types.PaginationToken) (res *types.Response, err error) {
|
||||||
localpart, _, err := gomatrixserverlib.SplitID('@', req.device.UserID)
|
localpart, _, err := gomatrixserverlib.SplitID('@', req.device.UserID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return
|
||||||
}
|
}
|
||||||
var ignoredUserList []string
|
var ignoredUserList []string
|
||||||
if data, err := rp.accountDB.GetAccountDataByType(req.ctx, localpart, "", "m.ignored_user_list");
|
if data, e := rp.accountDB.GetAccountDataByType(req.ctx, localpart, "", "m.ignored_user_list"); e == nil && data != nil {
|
||||||
err == nil && data != nil {
|
|
||||||
var ignoredUserMap map[string]map[string]interface{}
|
var ignoredUserMap map[string]map[string]interface{}
|
||||||
if err = json.Unmarshal(data.Content, &ignoredUserMap); err == nil {
|
if e = json.Unmarshal(data.Content, &ignoredUserMap); e == nil {
|
||||||
ignoredUserList = make([]string, 0, len(ignoredUserMap))
|
ignoredUserList = make([]string, 0, len(ignoredUserMap))
|
||||||
for ignoredUser := range ignoredUserMap["ignored_users"] {
|
for ignoredUser := range ignoredUserMap["ignored_users"] {
|
||||||
ignoredUserList = append(ignoredUserList, ignoredUser)
|
ignoredUserList = append(ignoredUserList, ignoredUser)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue