2011-08-16 196 views
-2

我正在使用XMPP/JQuery開發聊天應用程序。在聊天應用程序中,對於 多聊天任務,首先請求會員參加 多聊天。我怎樣才能做到這一點。在聊天應用程序中發送多聊天通知

+2

請回去通過你的老問題並接受了一些答案。你會發現人們更有可能回答你的問題。 –

+0

我的意思是向特定用戶發送請求的節 – HoneySam

回答

0

如果您問的是如何邀請某人訪問多用戶聊天室,請閱讀XEP-0045, section 7.5。如果您需要邀請谷歌的用戶,直接發送邀請:

<message 
    from='[email protected]' 
    to='[email protected]'> 
    <x xmlns='http://jabber.org/protocol/muc#user'> 
    <invite from='[email protected]/desktop'> 
     <reason> 
     Hey Hecate, this is the place for all good witches! 
     </reason> 
    </invite> 
    <password>cauldronburn</password> 
    </x> 
</message> 

否則,請通過房間:

<message 
    from='[email protected]/desktop' 
    to='[email protected]'> 
    <x xmlns='http://jabber.org/protocol/muc#user'> 
    <invite to='[email protected]'> 
     <reason> 
     Hey Hecate, this is the place for all good witches! 
     </reason> 
    </invite> 
    </x> 
</message> 
+0

如何在JQuery中實現上述節? – HoneySam

+0

jQuery不是XMPP庫。你在使用Strophe.js嗎? –

+0

是的,我正在使用Strophe.js – HoneySam