summaryrefslogtreecommitdiff
path: root/xmpp/jid.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/jid.go')
-rw-r--r--xmpp/jid.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/xmpp/jid.go b/xmpp/jid.go
index 672e934..90c1509 100644
--- a/xmpp/jid.go
+++ b/xmpp/jid.go
@@ -26,18 +26,10 @@ func username(jid string) string {
list := []rune(jid)
for i, v := range list {
- if v == '/' {
- list = list[:i]
- break
- }
- }
-
- for i, v := range list {
if v == '@' {
- list = list[:i]
- break
+ return string(list[:i])
}
}
- return string(list)
+ return ""
}