Closed GoogleCodeExporter closed 9 years ago
Switchboard conversation is deprecated so you don't need GetID anymore. Just
call:
e.Sender.SendMessage(TextMessage);
What happens if you call this method?
Now everybody is contact. Contact is contact, Conversation(TemporaryGroup) is
contact, Circle is contact. If e.Sender.ClientType == IMAddressInfoType.Circle
|| IMAddressInfoType.TemporaryGroup, all participants will receive the message
you sent by calling e.Sender.SendMessage(TextMessage);
If you really need participants you can do some checks:
ContactList parties = null;
if (e.Sender.ClientType == IMAddressInfoType.TemporaryGroup ||
e.Sender.ClientType == IMAddressInfoType.Circle)
{
parties = e.Sender.ContactList; // Participants
Contact originalSenderToChat1On1 = e.Sender.OriginalSender;
}
For more information, please see change log:
http://code.google.com/p/msnp-sharp/wiki/MSNPSharp_v4X
Original comment by hepha...@gmail.com
on 11 Apr 2011 at 7:37
Thank you for your reply. Unfortunately IMAddressInfoType does not seem to be
recognized (not declared) and I am unable to locate it in teh object browser as
well.
Also e.Sender.ClientType seems to always be Object.PassportMember.
It may be a good thing to simplify all of that into "contact" but I need more
information for my program.
I need to store specific variables per-conversation (as one user may chat with
my program in more then one session and with various other participants and
every conversation needs to have individual variables).
I previously used a conversation-ID to separate them and align my variables to.
And from that ID I could also get all participants of that conversation.
Is there a way to get said ID from the TextMessageReceived event?
Original comment by matti_ko...@msn.com
on 11 Apr 2011 at 8:02
Download latest version 4.0.RC or checkout svn and recompile your code.
IMAddressInfoType in MSNPSharp namespace.
Again you can't GetID anymore because MSNP21 doesn't support it.
If you really need participants you can do some checks:
ContactList parties = null;
if (e.Sender.ClientType == IMAddressInfoType.TemporaryGroup ||
e.Sender.ClientType == IMAddressInfoType.Circle)
{
parties = e.Sender.ContactList; // Participants
Contact originalSenderToChat1On1 = e.Sender.OriginalSender;
}
For more information, please see change log:
http://code.google.com/p/msnp-sharp/wiki/MSNPSharp_v4X
Original comment by hepha...@gmail.com
on 11 Apr 2011 at 8:15
Okay thank you
I will need to redo my code again for the new version. I will try to find a
solution with that. Thanks.
Original comment by matti_ko...@msn.com
on 11 Apr 2011 at 9:03
Hello Matti,
Since the introduction of MSNP21, a lot of things have to be changed (although
we try hard to maintain a certain degree of backward compatibility, it still
breaks a lot of old things), we are really sorry for the inconvenience.
Original comment by freezing...@gmail.com
on 11 Apr 2011 at 8:40
Thank you for your support.
I managed to re-write and adjust my code work in the new version.
I am very satisfied with the results.
The new version of the API is (after the porting problems are sorted out) much
more user-friendly and error-redundant then the previous one.
For everyone interested, I used the e.Sender.Account -fake/temp-account as a
unique ID to identify and separate my conversation.
Thank you for your help and keep up the good work! :)
Original comment by matti_ko...@msn.com
on 12 Apr 2011 at 11:51
You are welcome, could you please tell us what project you are working on if
you don't mind sharing your project on our user's list?
Original comment by freezing...@gmail.com
on 13 Apr 2011 at 12:22
Original issue reported on code.google.com by
matti_ko...@msn.com
on 11 Apr 2011 at 1:49