aboutsummaryrefslogtreecommitdiff
path: root/connector/mattermost
diff options
context:
space:
mode:
Diffstat (limited to 'connector/mattermost')
-rw-r--r--connector/mattermost/mattermost.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/connector/mattermost/mattermost.go b/connector/mattermost/mattermost.go
index e3a6429..530938c 100644
--- a/connector/mattermost/mattermost.go
+++ b/connector/mattermost/mattermost.go
@@ -109,8 +109,6 @@ func (mm *Mattermost) Configure(c Configuration) error {
go mm.conn.WsReceiver()
go mm.conn.StatusLoop()
- fmt.Printf("CLIENT4: %#v\n", mm.conn.Client)
-
for i := 0; i < 42; i++ {
time.Sleep(time.Duration(1) * time.Second)
if mm.conn.WsConnected {
@@ -166,7 +164,6 @@ func (mm *Mattermost) reverseRoomId(id string) (bool, RoomID) {
teamName := mm.conn.GetTeamName(team)
if u, ok := mm.teams[teamName]; ok && u {
name := mm.conn.GetChannelName(id)
- fmt.Printf("CHANNEL NAME: %s TEAM: %s\n", name, teamName)
return true, RoomID(fmt.Sprintf("%s@%s@%s", name, teamName, mm.server))
} else {
return false, ""
@@ -329,7 +326,7 @@ func (mm *Mattermost) handleConnected() {
mm.caches.sentjoined = make(map[string]bool)
mm.caches.displayname = make(map[UserID]string)
- fmt.Printf("Connected to mattermost\n")
+ log.Debugf("Connected to mattermost: %s@%s\n", mm.username, mm.server)
// Handle incoming messages
go mm.handleLoop(mm.conn.MessageChan, mm.handlerStopChan)
@@ -468,8 +465,8 @@ func (mm *Mattermost) handleLoop(msgCh chan *matterclient.Message, quitCh chan b
case <-quitCh:
break
case msg := <-msgCh:
- fmt.Printf("Mattermost: %#v\n", msg)
- fmt.Printf("Mattermost raw: %#v\n", msg.Raw)
+ log.Tracef("Mattermost: %#v\n", msg)
+ log.Tracef("Mattermost raw: %#v\n", msg.Raw)
err := mm.handlePosted(msg.Raw)
if err != nil {
log.Warnf("Mattermost error: %s", err)