TReKiE / msnp-sharp

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

Opens up conversation without a cause? #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a few contacts to the bot's list
2. Add an eventhandler for ConversationCreated
3. Text a message to the contact as soon as it joins the conversation.
4. Start up the program and wait

What is the expected output? What do you see instead?
I would expect the bot to do nothing, but if I open up a contact's adress
card or sometimes without a cause it sends a message to me.

What version of the product are you using? (MSNPSharp, OS, Mono etc.)
MSNPSharp 2.5.4, Windows XP SP2, C#.

Please provide any additional information below.

Original issue reported on code.google.com by arthurva...@gmail.com on 23 Mar 2009 at 4:59

GoogleCodeExporter commented 9 years ago
Beginning with MSNP16, the owner is joined automatically to the conversation. 
So when
a message received, check the sender:

if (e.Sender.Mail == Owner.Mail)
{
    // Skip this message 
}

This is not a bug, this is a feature. If you manage a bot, you also should check
multi conversation and left the conversation to not answer all the participants 
when
a contact joined. For ex: (Conversation.Contacts.Count > 2)

Original comment by hepha...@gmail.com on 24 Mar 2009 at 10:33