This commit is contained in:
Tulir Asokan 2018-05-22 17:24:47 +03:00
parent cce79ab7d8
commit cc28c7b65f
13 changed files with 63 additions and 64 deletions

View File

@ -21,13 +21,13 @@ import (
"os"
"path/filepath"
"gopkg.in/yaml.v2"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/matrix/pushrules"
"encoding/json"
"strings"
"gopkg.in/yaml.v2"
"maunium.net/go/gomatrix"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/pushrules"
"maunium.net/go/gomuks/matrix/rooms"
"strings"
)
// Config contains the main config of gomuks.

View File

@ -337,7 +337,7 @@ func (c *Container) HandleReadReceipt(source EventSource, evt *gomatrix.Event) {
c.ui.Render()
}
func (c *Container) parseDirectChatInfo(evt *gomatrix.Event) (map[*rooms.Room]bool){
func (c *Container) parseDirectChatInfo(evt *gomatrix.Event) map[*rooms.Room]bool {
directChats := make(map[*rooms.Room]bool)
for _, rawRoomIDList := range evt.Content {
roomIDList, ok := rawRoomIDList.([]interface{})

View File

@ -17,16 +17,16 @@
package matrix
import (
"testing"
"maunium.net/go/gomuks/config"
"github.com/stretchr/testify/assert"
"net/http"
"maunium.net/go/gomatrix"
"strings"
"fmt"
"io/ioutil"
"encoding/json"
"fmt"
"github.com/stretchr/testify/assert"
"io/ioutil"
"maunium.net/go/gomatrix"
"maunium.net/go/gomuks/config"
"net/http"
"os"
"strings"
"testing"
)
func TestContainer_InitClient_Empty(t *testing.T) {

View File

@ -21,8 +21,8 @@ import (
"strconv"
"strings"
"maunium.net/go/gomuks/lib/glob"
"maunium.net/go/gomatrix"
"maunium.net/go/gomuks/lib/glob"
"maunium.net/go/gomuks/matrix/rooms"
)

View File

@ -17,9 +17,9 @@
package pushrules
import (
"maunium.net/go/gomuks/lib/glob"
"maunium.net/go/gomatrix"
"encoding/gob"
"maunium.net/go/gomatrix"
"maunium.net/go/gomuks/lib/glob"
)
func init() {

View File

@ -17,9 +17,9 @@
package pushrules_test
import (
"testing"
"maunium.net/go/gomuks/matrix/pushrules"
"github.com/stretchr/testify/assert"
"maunium.net/go/gomuks/matrix/pushrules"
"testing"
)
func TestPushRuleArray_GetActions_FirstMatchReturns(t *testing.T) {

View File

@ -17,9 +17,9 @@
package pushrules_test
import (
"testing"
"github.com/stretchr/testify/assert"
"maunium.net/go/gomuks/matrix/pushrules"
"testing"
)
func TestPushRule_Match_Conditions(t *testing.T) {
@ -148,7 +148,6 @@ func TestPushRule_Match_Room_Fail(t *testing.T) {
assert.False(t, rule.Match(blankTestRoom, event))
}
func TestPushRule_Match_Sender(t *testing.T) {
rule := &pushrules.PushRule{
Type: pushrules.SenderRule,

View File

@ -22,10 +22,10 @@ import (
"sync"
"time"
"encoding/gob"
"maunium.net/go/gomatrix"
"maunium.net/go/gomuks/debug"
"os"
"encoding/gob"
)
func init() {

View File

@ -22,11 +22,11 @@ import (
"strconv"
"github.com/evidlo/fuzzysearch/fuzzy"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/widget"
"maunium.net/go/tview"
"maunium.net/go/tcell"
"maunium.net/go/gomuks/debug"
"maunium.net/go/tview"
)
type FuzzySearchModal struct {

View File

@ -22,12 +22,12 @@ import (
"strconv"
"strings"
"math"
"maunium.net/go/gomuks/debug"
"maunium.net/go/gomuks/matrix/rooms"
"maunium.net/go/gomuks/ui/widget"
"maunium.net/go/tcell"
"maunium.net/go/tview"
"math"
)
type orderedRoom struct {

View File

@ -17,8 +17,8 @@
package widget
import (
"maunium.net/go/tview"
"maunium.net/go/tcell"
"maunium.net/go/tview"
)
// Center wraps the given tview primitive into a Flex element in order to

View File

@ -17,10 +17,10 @@
package widget
import (
"fmt"
"github.com/mattn/go-runewidth"
"maunium.net/go/tcell"
"maunium.net/go/tview"
"fmt"
"strconv"
)