summaryrefslogtreecommitdiffstats
path: root/bridge/mumble
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/mumble')
-rw-r--r--bridge/mumble/handlers.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/bridge/mumble/handlers.go b/bridge/mumble/handlers.go
index a6845955..40272633 100644
--- a/bridge/mumble/handlers.go
+++ b/bridge/mumble/handlers.go
@@ -19,6 +19,12 @@ func (b *Bmumble) handleTextMessage(event *gumble.TextMessageEvent) {
if event.TextMessage.Sender != nil {
sender = event.TextMessage.Sender.Name
}
+ // If the text message is received before receiving a ServerSync
+ // and UserState, Client.Self or Self.Channel are nil
+ if event.Client.Self == nil || event.Client.Self.Channel == nil {
+ b.Log.Warn("Connection bootstrap not finished, discarding text message")
+ return
+ }
// Convert Mumble HTML messages to markdown
parts, err := b.convertHTMLtoMarkdown(event.TextMessage.Message)
if err != nil {