forked from jshiffer/go-xmpp
fixed #17
This commit is contained in:
parent
df87efc875
commit
53846d1e34
@ -57,7 +57,12 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
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 {
|
for {
|
||||||
|
Loading…
Reference in New Issue
Block a user