Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
slimtugo #1
Member since Oct 2009 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: Add groups to roster
Hello guys,
l have 2 questions with regards the miniclient.
1. How do i create other groups in the roaster thats apart from the default online and offline groups, and add a jid to it.
2. How can i block messages from a jid.
Thanks.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by slimtugo:
1. How do i create other groups in the roaster thats apart from the default online and offline groups, and add a jid to it.

you have to add the groups to the contacts directly. Groups are like tags and labels. You can use the UpdateRosterItem member in the RosterManager.

Quote by slimtugo:
2. How can i block messages from a jid.

either with XEP-0016 Privacy Lists on the server side or with white and black lists on the client directly.

Alex
Avatar
slimtugo #3
Member since Oct 2009 · 4 posts
Group memberships: Members
Show profile · Link to this post
Hello Alex,
Thanks for your timely reply, I really appreciate the help. This is the code i added below a buttons click event handler.After executing the code below, i still receive messages from the jid i blocked why is that happening? I thought once the code executed i will stop receiving messages from that jid.


            agsXMPP.protocol.iq.privacy.PrivacyIq piq = new agsXMPP.protocol.iq.privacy.PrivacyIq();
            piq.Type = IqType.set;
            agsXMPP.protocol.iq.privacy.Item itm = new agsXMPP.protocol.iq.privacy.Item();
            itm.Type = agsXMPP.protocol.iq.privacy.Type.jid;
            itm.Val = m_Jid.Bare.ToString();
            itm.Order = 3;
            itm.Action = agsXMPP.protocol.iq.privacy.Action.deny;
            itm.Stanza = agsXMPP.protocol.iq.privacy.Stanza.Message | agsXMPP.protocol.iq.privacy.Stanza.IncomingPresence | agsXMPP.protocol.iq.privacy.Stanza.OutgoingPresence;
            agsXMPP.protocol.iq.privacy.List list = new agsXMPP.protocol.iq.privacy.List("lgnore");
list.Additem(itm);
Piq.query.Addlist(list);
_connection.send(piq);

Hope to read from you soon.
Tugo.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you also have to activate the list, set a list as the default list. Its not enough to create a list and send it to the server.
I think this is missing in your code yet.

Alex
Avatar
slimtugo #5
Member since Oct 2009 · 4 posts
Group memberships: Members
Show profile · Link to this post
Thanks alex it works.
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:
Forum: agsXMPP RSS