public void CreateChatRoom() { XmppClient xmppClient = XmppClients[Context.ConnectionId]; mm = new MucManager(xmppClient); mm.EnterRoom("ALLURE786", "*****@*****.**", true); mm.Invite("*****@*****.**", "ALLURE786", "Please join"); mm.Invite("*****@*****.**", "ALLURE786", "Please join"); }
public FormConferention(string _roomJid, string _roomName, bool _savingHistory, bool _persistRoom, string _roomDesc = "", List <string> users = null) { InitializeComponent(); roomJid = new Jid(_roomJid); roomName = _roomName; this.Text = _roomName; roomDesc = _roomDesc; mainJid = Settings.jid; nickname = Settings.nickname; xmpp = Settings.xmpp; muc = new MucManager(xmpp); savingHistory = _savingHistory ? "1" : "0"; persistRoom = _persistRoom ? "1" : "0"; //muc.AcceptDefaultConfiguration(roomJid, new IqCB(OnGetFieldsResult)); muc.CreateReservedRoom(roomJid); muc.GrantOwnershipPrivileges(roomJid, new Jid(mainJid)); muc.JoinRoom(roomJid, nickname); initMucConfig(); xmpp.MesagageGrabber.Add(roomJid, new BareJidComparer(), new MessageCB(MessageCallback), null); xmpp.PresenceGrabber.Add(roomJid, new BareJidComparer(), new PresenceCB(PresenceCallback), null); muc.Invite(users.ConvertAll <Jid>( delegate(string jid) { return(new Jid(jid)); } ).ToArray(), roomJid, "Вы приглашены в конференцию Конф."); }
public void GroupChat()//Jid roomJid, string nickname) { XmppClient xmppClient = XmppClients[Context.ConnectionId]; mm = new MucManager(xmppClient); // mm.EnterRoom("ALLURE786", "*****@*****.**"); // mm = new MucManager(xmppClient); mm.EnterRoom("ALLURE786", "*****@*****.**", true); mm.Invite("*****@*****.**", "ALLURE786", "Please join"); // mm.Invite("*****@*****.**", "ALLURE786", "Please join"); // Setup new Message Callback using the MessageFilter // xmppClient.MessageFilter.Add(roomJid, new BareJidComparer(), MessageCallback); // Setup new Presence Callback using the PresenceFilter // xmppClient.PresenceFilter.Add(roomJid, new BareJidComparer(), PresenceCallback); }
public void Invite(string roomJid, string jid) { _muc.Invite(roomJid, jid); }
public void Invite(Jid[] user) { _mucManager.Invite(user, RoomJid, "Come chat"); }