Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
yagami #1
Member since Mar 2012 · 30 posts
Group memberships: Members
Show profile · Link to this post
Subject: GroupChat?
Does the SDK can use groupchat in windows phone?Has any example?

Thanks a lot!
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes of course. Download the full version of the SDK, there is a group chat example in the MiniClient. The API is exactly the same for all MatriX versions.

Alex
Avatar
yagami #3
Member since Mar 2012 · 30 posts
Group memberships: Members
Show profile · Link to this post
How to change the room's permissions?
I create a room, but it said "This room is locked from entry until configuration is confirmed."...

Thanks a lot~
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
  • either change it on your server so that no configuration is required
  • Request an instant room which accepts the default configuration
  • Request the room configuration form and submit your room configuration

Here is some example code from one of my custom muc clients:

  1. private BareJidComparer bjc = new BareJidComparer();
  2. private FullJidComparer fjc = new FullJidComparer();
  3.  
  4. // in the OnPresence event check if the rooms returns an error
  5. // and room configuration is required.        
  6. private void OnPresence(object Sender, PresenceEventArgs ea)
  7. {
  8.     var pres = ea.Presence;
  9.     if (pres.Type == PresenceType.error)
  10.     {
  11.         HandlePresenceErrors(pres);
  12.     }
  13.     else
  14.     {
  15.         if (pres.From.Equals(new Jid(Jid + "/" + NickName), fjc))
  16.         {
  17.             //self presence
  18.             var xUser = pres.MucUser;
  19.             if (xUser != null)
  20.             {
  21.                 if (xUser.HasStatus(110))
  22.                 {
  23.                     tbbEmotes.IsEnabled = true;
  24.                     txtSend.IsEnabled = true;
  25.                 }
  26.  
  27.                 if (xUser.HasStatus(201))
  28.                 {
  29.                     // 201, Inform user that a new room has been created
  30.                     Global.MucManager.RequestInstantRoom(Jid, InstantRoomResult);
  31.                 }
  32.             }
  33.         }
  34.         mucRoster.SetPresence(pres);    
  35.     }
  36. }
  37.  
  38. private void InstantRoomResult(object sender, IqEventArgs args)
  39. {
  40.     if (args.Iq.Type == Matrix.Xmpp.IqType.result)
  41.     {
  42.        
  43.     }
  44. }
Avatar
yagami #5
Member since Mar 2012 · 30 posts
Group memberships: Members
Show profile · Link to this post
Thanks!!!!!
It's very useful!
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: