Subject: Setting default privacy list doesn't contain default element
I'm trying to set the default privacy list. The result looks like:
<iq xmlns="jabber:client" id="agsXMPP_5" type="set"><query xmlns="jabber:iq:privacy" /></iq>
And it should look something like:
<iq from='romeo@example.net/orchard' type='set' id='default1'>
<query xmlns='jabber:iq:privacy'>
<default name='special'/>
</query>
</iq>
The from attribute and the default element are missing.
The code looks like:
public void ChangeDefaultList(string name, IqCB cb, object cbArg)
{
PrivacyIq pIq = new PrivacyIq();
pIq.Type = agsXMPP.protocol.client.IqType.set;
pIq.Query.Default = new Default(name);
SendStanza(pIq, cb, cbArg);
}
When I trace through the pIq.Query.Default is being set to null so the AddChild just returns so the serialization to XML doesn't contain the default element. My C# isn't that sharp and embarrassingly, I just can't figure out what's happening in the different properties sets and gets.
Any ideas?
<iq xmlns="jabber:client" id="agsXMPP_5" type="set"><query xmlns="jabber:iq:privacy" /></iq>
And it should look something like:
<iq from='romeo@example.net/orchard' type='set' id='default1'>
<query xmlns='jabber:iq:privacy'>
<default name='special'/>
</query>
</iq>
The from attribute and the default element are missing.
The code looks like:
public void ChangeDefaultList(string name, IqCB cb, object cbArg)
{
PrivacyIq pIq = new PrivacyIq();
pIq.Type = agsXMPP.protocol.client.IqType.set;
pIq.Query.Default = new Default(name);
SendStanza(pIq, cb, cbArg);
}
When I trace through the pIq.Query.Default is being set to null so the AddChild just returns so the serialization to XML doesn't contain the default element. My C# isn't that sharp and embarrassingly, I just can't figure out what's happening in the different properties sets and gets.
Any ideas?
This post was edited 2 times, last on 2008-02-15, 00:12 by tjabber.