summaryrefslogtreecommitdiff
path: root/jabber-util.el
diff options
context:
space:
mode:
authorMagnus Henoch <mange@freemail.hu>2007-02-12 20:49:16 +0000
committerKirill A. Korinskiy <catap@catap.ru>2007-02-12 20:49:16 +0000
commit6abe9cf1f9062d4184e149ceeb1a4142e2594333 (patch)
tree006521da1fe50402b685ec1010cc29f5a319cebd /jabber-util.el
parent3c4ab57065ccf4943c16a0aba4581dcab9e1ff81 (diff)
Revision: mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-298
Creator: Magnus Henoch <mange@freemail.hu> Add jabber-connection-bare-jid
Diffstat (limited to 'jabber-util.el')
-rw-r--r--jabber-util.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/jabber-util.el b/jabber-util.el
index 88f4427..50e0205 100644
--- a/jabber-util.el
+++ b/jabber-util.el
@@ -106,6 +106,12 @@ properties to add to the result."
(plist-get sd :server) "/"
(plist-get sd :resource))))
+(defun jabber-connection-bare-jid (jc)
+ "Return the bare JID of the given connection."
+ (let ((sd (fsm-get-state-data jc)))
+ (concat (plist-get sd :username) "@"
+ (plist-get sd :server))))
+
(defun jabber-jid-username (string)
"return the username portion of a JID, or nil if no username"
(when (string-match "\\(.*\\)@.*\\(/.*\\)?" string)