42wim / matterbridge

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Apache License 2.0
6.55k stars 616 forks source link

Messages from MM to Slack duplicated on MM side #219

Closed seanvree closed 7 years ago

seanvree commented 7 years ago

Matterbridge Ver:

version: 0.16.2-dev caaf6f3

mattermost version:

Version: 3.10.0 Database: mysql

expected behavior.

Messages posted to MM channel are mirrored in slack channel

actual behavior.

Messages from a BOT or myself in MM channel are successfly mirrored in Slack Channel, however, are then duplicated back in MM Channel

LOGS

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd c:\matterbridge

c:\matterbridge>matterbridge64 --version
version: 0.16.2-dev caaf6f3

c:\matterbridge>matterbridge64 --debug
INFO[2017-07-17T01:58:02-07:00] Enabling debug
INFO[2017-07-17T01:58:02-07:00] Running version 0.16.2-dev caaf6f3
INFO[2017-07-17T01:58:02-07:00] WARNING: THIS IS A DEVELOPMENT VERSION. Things may break.
INFO[2017-07-17T01:58:02-07:00] Starting gateway: matterbridge
INFO[2017-07-17T01:58:02-07:00] Starting bridge: slack.seanvree
INFO[2017-07-17T01:58:02-07:00] Connecting using token (sending and receiving)  module=slack
INFO[2017-07-17T01:58:02-07:00] slack.seanvree: joining plex (plexslack.seanvree)
DEBU[2017-07-17T01:58:02-07:00] Choosing token based receiving                module=slack
INFO[2017-07-17T01:58:02-07:00] Starting bridge: mattermost.seanvree
INFO[2017-07-17T01:58:02-07:00] Connecting using login/password (sending and receiving)  module=mattermost
INFO[2017-07-17T01:58:02-07:00] Connecting seanvreebot (team: mattermost) on seanvree.com:8065  module=mattermost
INFO[2017-07-17T01:58:02-07:00] Found version 3.10.0.3.10.0.5f41114e341db6d818571e69a8792205.false  module=matterclient
DEBU[2017-07-17T01:58:02-07:00] trying login mattermost seanvreebot seanvree.com:8065  module=matterclient
DEBU[2017-07-17T01:58:03-07:00] initUser(): found our team mattermost (id: w33kdw9krtn6xjuznsqxut9yxy)  module=matterclient
DEBU[2017-07-17T01:58:03-07:00] WsClient: making connection: wss://seanvree.com:8065/api/v3/users/websocket  module=matterclient
DEBU[2017-07-17T01:58:03-07:00] WsClient: connected                           module=matterclient
INFO[2017-07-17T01:58:03-07:00] Connection succeeded                          module=mattermost
INFO[2017-07-17T01:58:03-07:00] mattermost.seanvree: joining plex (plexmattermost.seanvree)
DEBU[2017-07-17T01:58:03-07:00] Choosing login/password based receiving       module=mattermost
DEBU[2017-07-17T01:58:03-07:00] Not joining w9if6bim37yttgezkikgbwd9yo already joined.  module=matterclient
INFO[2017-07-17T01:58:03-07:00] Gateway(s) started succesfully. Now relaying messages
DEBU[2017-07-17T01:58:03-07:00] StatusLoop:<nil>                              module=matterclient
DEBU[2017-07-17T01:58:03-07:00] WS PING                                       module=matterclient
DEBU[2017-07-17T01:58:03-07:00] WsReceiver event: model.WebSocketEvent{Event:"hello", Data:map[string]interface {}{"server_version":"3.10.0.3.10.0.5f41114e341db6d818571e69a8792205.false"}, Broadcast:(*model.WebsocketBroadcast)(0xc0423e8200), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:58:03-07:00] sendWsRequest &model.WebSocketRequest{Seq:1, Action:"ping", Data:map[string]interface {}(nil), Session:model.Session{Id:"", Token:"", CreateAt:0, ExpiresAt:0, LastActivityAt:0, UserId:"", DeviceId:"", Roles:"", IsOAuth:false, Props:model.StringMap(nil), TeamMembers:[]*model.TeamMember(nil)}, T:(i18n.TranslateFunc)(nil), Locale:""}  module=matterclient
DEBU[2017-07-17T01:58:03-07:00] WsReceiver event: model.WebSocketEvent{Event:"status_change", Data:map[string]interface {}{"status":"online", "user_id":"xgsrtb3e7pbwmqr4h1jrfsh6we"}, Broadcast:(*model.WebsocketBroadcast)(0xc0423e84c0), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:58:03-07:00] map[string]interface {}{"server_version":"3.10.0.3.10.0.5f41114e341db6d818571e69a8792205.false"}  module=mattermost
DEBU[2017-07-17T01:58:03-07:00] WsReceiver response: model.WebSocketResponse{Status:"OK", SeqReply:1, Data:map[string]interface {}{"node_id":"", "server_time":1.500281883079e+12, "text":"pong", "version":"3.10.0"}, Error:(*model.AppError)(nil), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:58:03-07:00] map[string]interface {}{"status":"online", "user_id":"xgsrtb3e7pbwmqr4h1jrfsh6we"}  module=mattermost
DEBU[2017-07-17T01:58:03-07:00] WS PONG received                              module=matterclient
DEBU[2017-07-17T01:58:03-07:00] my bot ID is "B6328FSSU"                      module=slack
DEBU[2017-07-17T01:58:03-07:00] my bot ID is "B64DMPPPG"                      module=slack
DEBU[2017-07-17T01:58:03-07:00] Start listening for Slack messages            module=slack
DEBU[2017-07-17T01:58:09-07:00] WsReceiver event: model.WebSocketEvent{Event:"typing", Data:map[string]interface {}{"parent_id":"", "user_id":"f58f9n9d9tgcmd1kercnxrp3jw"}, Broadcast:(*model.WebsocketBroadcast)(0xc0423e8700), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:58:09-07:00] map[string]interface {}{"parent_id":"", "user_id":"f58f9n9d9tgcmd1kercnxrp3jw"}  module=mattermost
DEBU[2017-07-17T01:58:12-07:00] WsReceiver event: model.WebSocketEvent{Event:"posted", Data:map[string]interface {}{"channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O", "post":"{\"id\":\"yemzj4zbcigrpbtj8nzmabd8ga\",\"create_at\":1500281892503,\"update_at\":1500281892503,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"f58f9n9d9tgcmd1kercnxrp3jw\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"test from MM\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"f58f9n9d9tgcmd1kercnxrp3jw:1500281892499\"}", "sender_name":"seanvree", "team_id":"w33kdw9krtn6xjuznsqxut9yxy"}, Broadcast:(*model.WebsocketBroadcast)(0xc04204afc0), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:58:12-07:00] map[string]interface {}{"channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O", "post":"{\"id\":\"yemzj4zbcigrpbtj8nzmabd8ga\",\"create_at\":1500281892503,\"update_at\":1500281892503,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"f58f9n9d9tgcmd1kercnxrp3jw\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"test from MM\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"f58f9n9d9tgcmd1kercnxrp3jw:1500281892499\"}", "sender_name":"seanvree", "team_id":"w33kdw9krtn6xjuznsqxut9yxy"}  module=mattermost
DEBU[2017-07-17T01:58:12-07:00] Receiving from matterclient &matterclient.Message{Raw:(*model.WebSocketEvent)(0xc04204af80), Post:(*model.Post)(0xc04245a500), Team:"mattermost", Channel:"plex", Username:"seanvree", Text:"test from MM", Type:"", UserID:"f58f9n9d9tgcmd1kercnxrp3jw"}  module=mattermost
DEBU[2017-07-17T01:58:12-07:00] Sending message from seanvree on mattermost.seanvree to gateway  module=mattermost
DEBU[2017-07-17T01:58:12-07:00] Sending config.Message{Text:"test from MM", Channel:"plex", Username:"seanvree", UserID:"f58f9n9d9tgcmd1kercnxrp3jw", Avatar:"", Account:"mattermost.seanvree", Event:"", Protocol:"", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878692, nsec:514212900, loc:(*time.Location)(0x1371f20)}} from mattermost.seanvree (plex) to slack.seanvree (plex)
DEBU[2017-07-17T01:58:12-07:00] Receiving config.Message{Text:"test from MM", Channel:"plex", Username:"", UserID:"f58f9n9d9tgcmd1kercnxrp3jw", Avatar:"", Account:"mattermost.seanvree", Event:"", Protocol:"mattermost", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878692, nsec:514212900, loc:(*time.Location)(0x1371f20)}}  module=slack
DEBU[2017-07-17T01:58:21-07:00] Receiving from slackclient &slack.MessageEvent{Msg:slack.Msg{Type:"message", Channel:"C612GRVK3", User:"U61L2PQ3E", Text:"test from slack", Timestamp:"1500281901.479458", ThreadTimestamp:"", IsStarred:false, PinnedTo:[]string(nil), Attachments:[]slack.Attachment(nil), Edited:(*slack.Edited)(nil), SubType:"", Hidden:false, DeletedTimestamp:"", EventTimestamp:"", BotID:"", Username:"", Icons:(*slack.Icon)(nil), Inviter:"", Topic:"", Purpose:"", Name:"", OldName:"", Members:[]string(nil), ReplyCount:0, Replies:[]slack.Reply(nil), ParentUserId:"", File:(*slack.File)(nil), Upload:false, Comment:(*slack.Comment)(nil), ItemType:"", ReplyTo:0, Team:"T62DQ8Q3H", Reactions:[]slack.ItemReaction(nil)}, SubMessage:(*slack.Msg)(nil)}  module=slack
DEBU[2017-07-17T01:58:21-07:00] Sending message from seanvree on slack.seanvree to gateway  module=slack
DEBU[2017-07-17T01:58:21-07:00] Sending config.Message{Text:"test from slack", Channel:"plex", Username:"seanvree", UserID:"U61L2PQ3E", Avatar:"https://secure.gravatar.com/avatar/da5c2aac9b67ef8bc7e14230a8c2e4e8.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2F66f9%2Fimg%2Favatars%2Fava_0004-48.png", Account:"slack.seanvree", Event:"", Protocol:"", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878701, nsec:806687100, loc:(*time.Location)(0x1371f20)}} from slack.seanvree (plex) to mattermost.seanvree (plex)
DEBU[2017-07-17T01:58:21-07:00] Receiving config.Message{Text:"test from slack", Channel:"plex", Username:"", UserID:"U61L2PQ3E", Avatar:"https://secure.gravatar.com/avatar/da5c2aac9b67ef8bc7e14230a8c2e4e8.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2F66f9%2Fimg%2Favatars%2Fava_0004-48.png", Account:"slack.seanvree", Event:"", Protocol:"slack", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878701, nsec:806687100, loc:(*time.Location)(0x1371f20)}}  module=mattermost
DEBU[2017-07-17T01:58:21-07:00] WsReceiver event: model.WebSocketEvent{Event:"posted", Data:map[string]interface {}{"post":"{\"id\":\"saj8ihmtkfbfdqoqj5cfbp1kca\",\"create_at\":1500281901941,\"update_at\":1500281901941,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"xgsrtb3e7pbwmqr4h1jrfsh6we\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"test from slack\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"\"}", "sender_name":"seanvreebot", "team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O"}, Broadcast:(*model.WebsocketBroadcast)(0xc04204b600), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:58:22-07:00] map[string]interface {}{"post":"{\"id\":\"saj8ihmtkfbfdqoqj5cfbp1kca\",\"create_at\":1500281901941,\"update_at\":1500281901941,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"xgsrtb3e7pbwmqr4h1jrfsh6we\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"test from slack\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"\"}", "sender_name":"seanvreebot", "team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O"}  module=mattermost
DEBU[2017-07-17T01:58:24-07:00] WsReceiver event: model.WebSocketEvent{Event:"typing", Data:map[string]interface {}{"parent_id":"", "user_id":"f58f9n9d9tgcmd1kercnxrp3jw"}, Broadcast:(*model.WebsocketBroadcast)(0xc04204b700), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:58:24-07:00] map[string]interface {}{"user_id":"f58f9n9d9tgcmd1kercnxrp3jw", "parent_id":""}  module=mattermost
DEBU[2017-07-17T01:58:26-07:00] WsReceiver event: model.WebSocketEvent{Event:"posted", Data:map[string]interface {}{"team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O", "post":"{\"id\":\"k31x9tp313ri3e3rer5x56f14r\",\"create_at\":1500281906638,\"update_at\":1500281906638,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"f58f9n9d9tgcmd1kercnxrp3jw\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"test from MM\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"f58f9n9d9tgcmd1kercnxrp3jw:1500281906632\"}", "sender_name":"seanvree"}, Broadcast:(*model.WebsocketBroadcast)(0xc04204bcc0), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:58:26-07:00] map[string]interface {}{"channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O", "post":"{\"id\":\"k31x9tp313ri3e3rer5x56f14r\",\"create_at\":1500281906638,\"update_at\":1500281906638,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"f58f9n9d9tgcmd1kercnxrp3jw\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"test from MM\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"f58f9n9d9tgcmd1kercnxrp3jw:1500281906632\"}", "sender_name":"seanvree", "team_id":"w33kdw9krtn6xjuznsqxut9yxy"}  module=mattermost
DEBU[2017-07-17T01:58:26-07:00] Receiving from matterclient &matterclient.Message{Raw:(*model.WebSocketEvent)(0xc04204b780), Post:(*model.Post)(0xc04245b000), Team:"mattermost", Channel:"plex", Username:"seanvree", Text:"test from MM", Type:"", UserID:"f58f9n9d9tgcmd1kercnxrp3jw"}  module=mattermost
DEBU[2017-07-17T01:58:26-07:00] Sending message from seanvree on mattermost.seanvree to gateway  module=mattermost
DEBU[2017-07-17T01:58:26-07:00] Sending config.Message{Text:"test from MM", Channel:"plex", Username:"seanvree", UserID:"f58f9n9d9tgcmd1kercnxrp3jw", Avatar:"", Account:"mattermost.seanvree", Event:"", Protocol:"", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878706, nsec:656002100, loc:(*time.Location)(0x1371f20)}} from mattermost.seanvree (plex) to slack.seanvree (plex)
DEBU[2017-07-17T01:58:26-07:00] Receiving config.Message{Text:"test from MM", Channel:"plex", Username:"", UserID:"f58f9n9d9tgcmd1kercnxrp3jw", Avatar:"", Account:"mattermost.seanvree", Event:"", Protocol:"mattermost", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878706, nsec:656002100, loc:(*time.Location)(0x1371f20)}}  module=slack
DEBU[2017-07-17T01:58:26-07:00] Receiving from slackclient &slack.MessageEvent{Msg:slack.Msg{Type:"message", Channel:"C612GRVK3", User:"U63P6V1JQ", Text:" test from MM", Timestamp:"1500281906.481139", ThreadTimestamp:"", IsStarred:false, PinnedTo:[]string(nil), Attachments:[]slack.Attachment(nil), Edited:(*slack.Edited)(nil), SubType:"", Hidden:false, DeletedTimestamp:"", EventTimestamp:"1500281906.481139", BotID:"B6328FSSU", Username:"", Icons:(*slack.Icon)(nil), Inviter:"", Topic:"", Purpose:"", Name:"", OldName:"", Members:[]string(nil), ReplyCount:0, Replies:[]slack.Reply(nil), ParentUserId:"", File:(*slack.File)(nil), Upload:false, Comment:(*slack.Comment)(nil), ItemType:"", ReplyTo:0, Team:"T62DQ8Q3H", Reactions:[]slack.ItemReaction(nil)}, SubMessage:(*slack.Msg)(nil)}  module=slack
DEBU[2017-07-17T01:58:26-07:00] Sending message from Slack API Tester on slack.seanvree to gateway  module=slack
DEBU[2017-07-17T01:58:26-07:00] Sending config.Message{Text:" test from MM", Channel:"plex", Username:"Slack API Tester", UserID:"B6328FSSU", Avatar:"", Account:"slack.seanvree", Event:"", Protocol:"", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878706, nsec:881105700, loc:(*time.Location)(0x1371f20)}} from slack.seanvree (plex) to mattermost.seanvree (plex)
DEBU[2017-07-17T01:58:26-07:00] Receiving config.Message{Text:" test from MM", Channel:"plex", Username:"", UserID:"B6328FSSU", Avatar:"", Account:"slack.seanvree", Event:"", Protocol:"slack", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878706, nsec:881105700, loc:(*time.Location)(0x1371f20)}}  module=mattermost
DEBU[2017-07-17T01:58:26-07:00] WsReceiver event: model.WebSocketEvent{Event:"posted", Data:map[string]interface {}{"channel_type":"O", "post":"{\"id\":\"o77whu3fg3n39qrt5kh4n4houw\",\"create_at\":1500281906897,\"update_at\":1500281906897,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"xgsrtb3e7pbwmqr4h1jrfsh6we\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\" test from MM\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"\"}", "sender_name":"seanvreebot", "team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex"}, Broadcast:(*model.WebsocketBroadcast)(0xc0423ca3c0), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:58:26-07:00] map[string]interface {}{"channel_type":"O", "post":"{\"id\":\"o77whu3fg3n39qrt5kh4n4houw\",\"create_at\":1500281906897,\"update_at\":1500281906897,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"xgsrtb3e7pbwmqr4h1jrfsh6we\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\" test from MM\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"\"}", "sender_name":"seanvreebot", "team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex"}  module=mattermost
DEBU[2017-07-17T01:59:00-07:00] Receiving from slackclient &slack.MessageEvent{Msg:slack.Msg{Type:"message", Channel:"C612GRVK3", User:"", Text:"", Timestamp:"1500281940.492561", ThreadTimestamp:"", IsStarred:false, PinnedTo:[]string(nil), Attachments:[]slack.Attachment{slack.Attachment{Color:"36a64f", Fallback:"This is a test message sent from the WebApp.", CallbackID:"", AuthorName:"", AuthorSubname:"", AuthorLink:"", AuthorIcon:"", Title:"", TitleLink:"", Pretext:"", Text:"This is a test message sent from the WebApp.", ImageURL:"", ThumbURL:"", Fields:[]slack.AttachmentField{slack.AttachmentField{Title:"Priority", Value:"Normal", Short:true}}, Actions:[]slack.AttachmentAction(nil), MarkdownIn:[]string(nil), Footer:"", FooterIcon:"", Ts:""}}, Edited:(*slack.Edited)(nil), SubType:"bot_message", Hidden:false, DeletedTimestamp:"", EventTimestamp:"1500281940.492561", BotID:"B61847QE5", Username:"", Icons:(*slack.Icon)(nil), Inviter:"", Topic:"", Purpose:"", Name:"", OldName:"", Members:[]string(nil), ReplyCount:0, Replies:[]slack.Reply(nil), ParentUserId:"", File:(*slack.File)(nil), Upload:false, Comment:(*slack.Comment)(nil), ItemType:"", ReplyTo:0, Team:"T62DQ8Q3H", Reactions:[]slack.ItemReaction(nil)}, SubMessage:(*slack.Msg)(nil)}  module=slack
DEBU[2017-07-17T01:59:00-07:00] Sending message from Pulseway on slack.seanvree to gateway  module=slack
DEBU[2017-07-17T01:59:00-07:00] Sending config.Message{Text:"This is a test message sent from the WebApp.", Channel:"plex", Username:"Pulseway", UserID:"B61847QE5", Avatar:"", Account:"slack.seanvree", Event:"", Protocol:"", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878740, nsec:272822700, loc:(*time.Location)(0x1371f20)}} from slack.seanvree (plex) to mattermost.seanvree (plex)
DEBU[2017-07-17T01:59:00-07:00] Receiving config.Message{Text:"This is a test message sent from the WebApp.", Channel:"plex", Username:"", UserID:"B61847QE5", Avatar:"", Account:"slack.seanvree", Event:"", Protocol:"slack", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878740, nsec:272822700, loc:(*time.Location)(0x1371f20)}}  module=mattermost
DEBU[2017-07-17T01:59:00-07:00] WsReceiver event: model.WebSocketEvent{Event:"posted", Data:map[string]interface {}{"post":"{\"id\":\"gdxq83h5ejb65x8ukqc84uaspw\",\"create_at\":1500281940283,\"update_at\":1500281940283,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"xgsrtb3e7pbwmqr4h1jrfsh6we\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"This is a test message sent from the WebApp.\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"\"}", "sender_name":"seanvreebot", "team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O"}, Broadcast:(*model.WebsocketBroadcast)(0xc0423e8a00), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:59:00-07:00] map[string]interface {}{"channel_type":"O", "post":"{\"id\":\"gdxq83h5ejb65x8ukqc84uaspw\",\"create_at\":1500281940283,\"update_at\":1500281940283,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"xgsrtb3e7pbwmqr4h1jrfsh6we\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"This is a test message sent from the WebApp.\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"\"}", "sender_name":"seanvreebot", "team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex"}  module=mattermost
DEBU[2017-07-17T01:59:03-07:00] WS PING                                       module=matterclient
DEBU[2017-07-17T01:59:03-07:00] sendWsRequest &model.WebSocketRequest{Seq:2, Action:"ping", Data:map[string]interface {}(nil), Session:model.Session{Id:"", Token:"", CreateAt:0, ExpiresAt:0, LastActivityAt:0, UserId:"", DeviceId:"", Roles:"", IsOAuth:false, Props:model.StringMap(nil), TeamMembers:[]*model.TeamMember(nil)}, T:(i18n.TranslateFunc)(nil), Locale:""}  module=matterclient
DEBU[2017-07-17T01:59:03-07:00] WsReceiver response: model.WebSocketResponse{Status:"OK", SeqReply:2, Data:map[string]interface {}{"node_id":"", "server_time":1.500281943191e+12, "text":"pong", "version":"3.10.0"}, Error:(*model.AppError)(nil), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:59:03-07:00] WS PONG received                              module=matterclient
DEBU[2017-07-17T01:59:33-07:00] WsReceiver event: model.WebSocketEvent{Event:"posted", Data:map[string]interface {}{"team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O", "post":"{\"id\":\"drk7trib8prz9xqoi3qxmwzjby\",\"create_at\":1500281973612,\"update_at\":1500281973612,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"f58f9n9d9tgcmd1kercnxrp3jw\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"Test Notification\",\"type\":\"\",\"props\":{\"from_webhook\":\"true\",\"override_icon_url\":\"https://sabnzbd.org/images/icons/apple-touch-icon-76x76-precomposed.png\",\"override_username\":\"sabnzbd\"},\"hashtags\":\"\",\"pending_post_id\":\"\"}", "sender_name":"sabnzbd"}, Broadcast:(*model.WebsocketBroadcast)(0xc042498dc0), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:59:33-07:00] map[string]interface {}{"channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O", "post":"{\"id\":\"drk7trib8prz9xqoi3qxmwzjby\",\"create_at\":1500281973612,\"update_at\":1500281973612,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"f58f9n9d9tgcmd1kercnxrp3jw\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\"Test Notification\",\"type\":\"\",\"props\":{\"from_webhook\":\"true\",\"override_icon_url\":\"https://sabnzbd.org/images/icons/apple-touch-icon-76x76-precomposed.png\",\"override_username\":\"sabnzbd\"},\"hashtags\":\"\",\"pending_post_id\":\"\"}", "sender_name":"sabnzbd", "team_id":"w33kdw9krtn6xjuznsqxut9yxy"}  module=mattermost
DEBU[2017-07-17T01:59:33-07:00] Receiving from matterclient &matterclient.Message{Raw:(*model.WebSocketEvent)(0xc042498d80), Post:(*model.Post)(0xc0423a1200), Team:"mattermost", Channel:"plex", Username:"seanvree", Text:"Test Notification", Type:"", UserID:"f58f9n9d9tgcmd1kercnxrp3jw"}  module=mattermost
DEBU[2017-07-17T01:59:33-07:00] Sending message from seanvree on mattermost.seanvree to gateway  module=mattermost
DEBU[2017-07-17T01:59:33-07:00] Sending config.Message{Text:"Test Notification", Channel:"plex", Username:"seanvree", UserID:"f58f9n9d9tgcmd1kercnxrp3jw", Avatar:"", Account:"mattermost.seanvree", Event:"", Protocol:"", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878773, nsec:628935700, loc:(*time.Location)(0x1371f20)}} from mattermost.seanvree (plex) to slack.seanvree (plex)
DEBU[2017-07-17T01:59:33-07:00] Receiving config.Message{Text:"Test Notification", Channel:"plex", Username:"", UserID:"f58f9n9d9tgcmd1kercnxrp3jw", Avatar:"", Account:"mattermost.seanvree", Event:"", Protocol:"mattermost", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878773, nsec:628935700, loc:(*time.Location)(0x1371f20)}}  module=slack
DEBU[2017-07-17T01:59:33-07:00] Receiving from slackclient &slack.MessageEvent{Msg:slack.Msg{Type:"message", Channel:"C612GRVK3", User:"U63P6V1JQ", Text:" Test Notification", Timestamp:"1500281973.504122", ThreadTimestamp:"", IsStarred:false, PinnedTo:[]string(nil), Attachments:[]slack.Attachment(nil), Edited:(*slack.Edited)(nil), SubType:"", Hidden:false, DeletedTimestamp:"", EventTimestamp:"1500281973.504122", BotID:"B6328FSSU", Username:"", Icons:(*slack.Icon)(nil), Inviter:"", Topic:"", Purpose:"", Name:"", OldName:"", Members:[]string(nil), ReplyCount:0, Replies:[]slack.Reply(nil), ParentUserId:"", File:(*slack.File)(nil), Upload:false, Comment:(*slack.Comment)(nil), ItemType:"", ReplyTo:0, Team:"T62DQ8Q3H", Reactions:[]slack.ItemReaction(nil)}, SubMessage:(*slack.Msg)(nil)}  module=slack
DEBU[2017-07-17T01:59:33-07:00] Sending message from Slack API Tester on slack.seanvree to gateway  module=slack
DEBU[2017-07-17T01:59:33-07:00] Sending config.Message{Text:" Test Notification", Channel:"plex", Username:"Slack API Tester", UserID:"B6328FSSU", Avatar:"", Account:"slack.seanvree", Event:"", Protocol:"", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878773, nsec:828272900, loc:(*time.Location)(0x1371f20)}} from slack.seanvree (plex) to mattermost.seanvree (plex)
DEBU[2017-07-17T01:59:33-07:00] Receiving config.Message{Text:" Test Notification", Channel:"plex", Username:"", UserID:"B6328FSSU", Avatar:"", Account:"slack.seanvree", Event:"", Protocol:"slack", Gateway:"matterbridge", Timestamp:time.Time{sec:63635878773, nsec:828272900, loc:(*time.Location)(0x1371f20)}}  module=mattermost
DEBU[2017-07-17T01:59:33-07:00] WsReceiver event: model.WebSocketEvent{Event:"posted", Data:map[string]interface {}{"team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O", "post":"{\"id\":\"qc93g5zkk3d35qhnnqmid4e37h\",\"create_at\":1500281973837,\"update_at\":1500281973837,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"xgsrtb3e7pbwmqr4h1jrfsh6we\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\" Test Notification\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"\"}", "sender_name":"seanvreebot"}, Broadcast:(*model.WebsocketBroadcast)(0xc0423ca080), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T01:59:33-07:00] map[string]interface {}{"sender_name":"seanvreebot", "team_id":"w33kdw9krtn6xjuznsqxut9yxy", "channel_display_name":"PLEX", "channel_name":"plex", "channel_type":"O", "post":"{\"id\":\"qc93g5zkk3d35qhnnqmid4e37h\",\"create_at\":1500281973837,\"update_at\":1500281973837,\"edit_at\":0,\"delete_at\":0,\"is_pinned\":false,\"user_id\":\"xgsrtb3e7pbwmqr4h1jrfsh6we\",\"channel_id\":\"w9if6bim37yttgezkikgbwd9yo\",\"root_id\":\"\",\"parent_id\":\"\",\"original_id\":\"\",\"message\":\" Test Notification\",\"type\":\"\",\"props\":{},\"hashtags\":\"\",\"pending_post_id\":\"\"}"}  module=mattermost
DEBU[2017-07-17T02:00:03-07:00] WS PING                                       module=matterclient
DEBU[2017-07-17T02:00:03-07:00] sendWsRequest &model.WebSocketRequest{Seq:3, Action:"ping", Data:map[string]interface {}(nil), Session:model.Session{Id:"", Token:"", CreateAt:0, ExpiresAt:0, LastActivityAt:0, UserId:"", DeviceId:"", Roles:"", IsOAuth:false, Props:model.StringMap(nil), TeamMembers:[]*model.TeamMember(nil)}, T:(i18n.TranslateFunc)(nil), Locale:""}  module=matterclient
DEBU[2017-07-17T02:00:03-07:00] WsReceiver response: model.WebSocketResponse{Status:"OK", SeqReply:3, Data:map[string]interface {}{"text":"pong", "version":"3.10.0", "node_id":"", "server_time":1.500282003581e+12}, Error:(*model.AppError)(nil), PreComputeJson:[]uint8(nil)}  module=matterclient
DEBU[2017-07-17T02:00:03-07:00] WS PONG received                              module=matterclient

configuration file

Bots are being used on both the Mattermost Side and Slack Side

[slack]
    [slack.seanvree]
    useAPI=false
    Token="xoxp-206466296119-207788987636-207076536592-44ff34822a38804359b99bfc2aebxxx"
    PrefixMessagesWithNick=true

[mattermost]
    [mattermost.seanvree]
    useAPI=false
    Server="mydomain.com:8065"
    Team="mattermost"
    Login="seanvreebot"
    Password="xxxx"
    PrefixMessagesWithNick=true

[[gateway]]
name="matterbridge"
enable=true

    [[gateway.inout]]
    account="slack.seanvree"
    channel="plex"

    [[gateway.inout]]
    account="mattermost.seanvree"
    channel="plex"
jheiselman commented 7 years ago

I just started seeing this with a Slack <-> Discord bridge. I'm wondering if Slack updated the API in the last 12 hours or so.

42wim commented 7 years ago

@jheiselman no, it's because I added support for relaying messages of other bots in #213

Could you run with -debug and tell me if you got more than 1 ```my bot ID is "B285XXXX"```` messages ?

I'm trying the bot to detect his own ID so we can ignore messages of that ID

jheiselman commented 7 years ago

@42wim yes I did get more than one. If you'd like the full debug output, let me know.

jheiselman commented 7 years ago

I think the information you want is in b.rtm.Client.info.User.ID

42wim commented 7 years ago

You would think so eh, but unfortunately not, that's the ID of the user that created the bot (or the test-token), not the bot ID itself

42wim commented 7 years ago

Found a way ;-) You can find binaries on https://bintray.com/42wim/nightly/Matterbridge/v0.16.1-23-gdc8743e#files

seanvree commented 7 years ago

@42wim thanks that did it!

Just as a Side note - should I have different BOT names for my slack bot and mm bot? Because right now I have my personal account, then I have seanvreebot that I use both on slack and MM.

So like names would be seanvreebotslack and seanvreebotMM?

42wim commented 7 years ago

@seanvree no, doesn't matter you can call them what you want

seanvree commented 7 years ago

cool appreciate the work @42wim !