Subject: A problem about add contact
I have the Matrix for .NET (version 1.5.3.0).
In my application, I do user search, and then add a selected search item as contact, the add operation code like:
1. In the search form (User A) to submit the add contact request:
var vjid = new Jid(lvUsers.SelectedItems[0].Text);
FPresenceManager.Subscribe(vjid);
2. In the main form (User B) to accept the request in xmppClient.OnPresence:
3. In the main form (User B) to add the contact (User A) to roster in presenceManager.OnSubscribe
Here, the add contact operation is completed, and the question is:
User B is in the User A's Online group, but User A is in the User B's offline group, and I try to relogin both, it remains so.
I tried the Mini Client of agsXMPP, and it has the same problem.
What can I do to make them in each the Online group both when they are both online?
Thanks!
In my application, I do user search, and then add a selected search item as contact, the add operation code like:
1. In the search form (User A) to submit the add contact request:
var vjid = new Jid(lvUsers.SelectedItems[0].Text);
FPresenceManager.Subscribe(vjid);
2. In the main form (User B) to accept the request in xmppClient.OnPresence:
- if (e.Presence.Type == PresenceType.subscribe)
- {
- + e.Presence.From + "], do you want to accept this?");
- if (vfrmInfo.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- presenceManager.ApproveSubscriptionRequest(e.Presence.From); //accept the request
- else
- presenceManager.DenySubscriptionRequest(e.Presence.From); //deny the request
- }
3. In the main form (User B) to add the contact (User A) to roster in presenceManager.OnSubscribe
- if (e.Presence.Type == PresenceType.subscribe)
- {
- rosterManager.Add(e.Presence.From);
- }
Here, the add contact operation is completed, and the question is:
User B is in the User A's Online group, but User A is in the User B's offline group, and I try to relogin both, it remains so.
I tried the Mini Client of agsXMPP, and it has the same problem.
What can I do to make them in each the Online group both when they are both online?
Thanks!