Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page:  1  2  next
Avatar
Huntsman #1
Member since Apr 2016 · 42 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to use MucUser in Presence.
Hello AGS,
i have a lil issue in presence class. when i use agsxmpp 1.0 version. i got this

  1.     Private Sub OnPres(ByVal sender As Object, ByVal pres As Presence)
  2.         Dim Affi As String = pres.MucUser.Item.Affiliation.ToString()
  3.     End Sub

but in Agsxmpp 1.3.1 i cannot find MucUser in Presence. :( can anyone know how to use MucUser in agsXmpp v.1.3.1

Thank you.
This post was edited on 2016-04-17, 01:36 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
MucUser is there, just verified it in the sources.

Alex
Avatar
Huntsman #3
Member since Apr 2016 · 42 posts
Group memberships: Members
Show profile · Link to this post
How to do this, sir.
please give me a demo code to do this. i really need this.
Avatar
Alex #4
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this code is from the MiniClient example (frmGroupChat.cs):

  1. var mucUser = pres.MucUser;
  2. if (mucUser != null)
  3. {
  4.     lvi.SubItems[2].Text = mucUser.Item.Affiliation.ToString();
  5.     lvi.SubItems[3].Text = mucUser.Item.Role.ToString();
  6. }
Avatar
Huntsman #5
Member since Apr 2016 · 42 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
this code is from the MiniClient example (frmGroupChat.cs):

  1. var mucUser = pres.MucUser;
  2. if (mucUser != null)
  3. {
  4.     lvi.SubItems[2].Text = mucUser.Item.Affiliation.ToString();
  5.     lvi.SubItems[3].Text = mucUser.Item.Role.ToString();
  6. }

Sir, i told you already that pres.MucUser is not there in AgsXMPP version 1.3.1. :(
Avatar
Alex #6
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
it is there, please checkout the latest code from SVN.
Avatar
Huntsman #7
Member since Apr 2016 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #5
check this screenshot sir.
The author has attached one file to this post:
SS.png 11.8 kBytes
You have no permission to open this file.
Avatar
Alex #8
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
no idea whats wrong in your project. The code in your screenshot complies without any problems for me.

Alex
Avatar
Huntsman #9
Member since Apr 2016 · 42 posts
Group memberships: Members
Show profile · Link to this post
i just download latest agsxmpp library from ags trunk but still have same problem :(
Avatar
Alex #10
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
no idea whats wrong. Seems to be VB specific.I works fine for me in a new small test project I just created.
Check all your namespace imports to see if there is anything which causes the "ambitious" compiler warning.

Alex
Avatar
Huntsman #11
Member since Apr 2016 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #9
please take a look on this project, Sir.
The author has attached one file to this post:
WindowsApplication8.rar 37.9 kBytes
You have no permission to open this file.
Avatar
Huntsman #12
Member since Apr 2016 · 42 posts
Group memberships: Members
Show profile · Link to this post
can you share which agsxmpp.dll you are using, Sir. i think have some problem in that agsxmpp.dll i have.
Avatar
Alex #13
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I am using the source from trunk
Avatar
Alex #14
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I see what your problem is, see here:
https://msdn.microsoft.com/en-us/library/ms2…?f=255&…

There is the namespace agsXMPP.protocol.x.muc.user and the class agsXMPP.protocol.x.muc.User in the latest version.
I guess you need to rename the Namespace and recompile it, because VB does not care about the casing.

Alex
Avatar
Huntsman #15
Member since Apr 2016 · 42 posts
Group memberships: Members
Show profile · Link to this post
sorry sir but still have same problem :( :( :'(
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:
Page:  1  2  next
Forum: agsXMPP RSS