msndevs / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
6 stars 2 forks source link

ContactService_ContactAdded was called four times #277

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.First call is before "Nameserver_ReverseAdded"
2.other calls are after "AddNewContact(contact.Account)"
3.

What is the expected output? What do you see instead?
I thought the method "AddNewContact()" just adds the new contact  to my  
allowed list .the result is aslo to my FowardList,so I call the method 
"contact.OnForwardList = false;",but it has no effect. The contact is still in 
the FowardList .

What version of the product are you using? (MSNPSharp, OS, Mono etc.)
4.0.0.2393
Is your code check out from SVN or download from our download site?
SVN

Please provide any additional information below:
I want my service have no limited of user quantity .so i just add contact into 
my AllowedList but not FowardList

Original issue reported on code.google.com by wwj...@gmail.com on 19 May 2011 at 3:00

GoogleCodeExporter commented 9 years ago
Unclear description, please explain it with more details or will be marked as 
invalid after 3 days.

Original comment by freezing...@gmail.com on 20 May 2011 at 3:05

GoogleCodeExporter commented 9 years ago
Thank You!
When I get a "ReverseAdded" event,I call the the method 
"ContactService.AddNewContact()" to add the contact to my allowdList,But I find 
that it also exists in FowardList. So I  have to call the method 
""contact.OnForwardList = false",but it has no effect.the contact is still in 
ForwadList.

Original comment by wwj...@gmail.com on 20 May 2011 at 4:13

GoogleCodeExporter commented 9 years ago
After calling contact.OnForwardList = false, you need to wait sometime to see 
whether the operation was successful or not, it's actually an async call.

Original comment by freezing...@gmail.com on 20 May 2011 at 5:34

GoogleCodeExporter commented 9 years ago
Allow list and forward list are not the same thing. İf you want to add remove 
contacts from forward list you must call contact service operations like 
addnewcontact and remove contact.

When reverse fired:
Contact.onallowedlist = true
Contact.onpendinglist= false

You dont have to add to forward list.

İf you call addnewcontact, contact will be added 3 list: allow, forward and 
reverse so you will receive  3 contactadded event. See e.list property when 
event fired.

Original comment by hepha...@gmail.com on 20 May 2011 at 8:45