mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 20:33:46 -07:00
fixed #17
This commit is contained in:
+6
-1
@@ -57,7 +57,12 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Println(chat.Remote, fromUTF8(chat.Text))
|
||||
switch v := chat.(type) {
|
||||
case xmpp.Chat:
|
||||
fmt.Println(v.Remote, fromUTF8(v.Text))
|
||||
case xmpp.Presence:
|
||||
fmt.Println(v.From, fromUTF8(v.Show))
|
||||
}
|
||||
}
|
||||
}()
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user