MSNP-SHARP 如何向状态从离线更改为在线的用户发送问候消息
我用这种方式尝试过。我订阅了控制用户状态的事件,它在在线中宣布了我该用户。 我的代码是:
void Nameserver_ContactOnline(object sender, ContactEventArgs e)
{
Talk = messenger.CreateConversation();
Talk.Invite(e.Contact.Mail,ClientType.PassportMember);
Talk.SendTextMessage(new TextMessage(Msg));
Talk.End();
LogEvent("Contact online " + e.Contact.Name.ToString() + " " + e.Contact.Mail.ToString());
}
有人可以给我提示吗?也许我做错了什么,因为消息未发送。 谢谢。
I tried in this way. I subscribed to that event who control the user status, its announcing me that user in Online.
my code is:
void Nameserver_ContactOnline(object sender, ContactEventArgs e)
{
Talk = messenger.CreateConversation();
Talk.Invite(e.Contact.Mail,ClientType.PassportMember);
Talk.SendTextMessage(new TextMessage(Msg));
Talk.End();
LogEvent("Contact online " + e.Contact.Name.ToString() + " " + e.Contact.Mail.ToString());
}
someone can give me a hint ? maybe i do something wrong because message wasn't sent.
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能只想使用 MessageManager 属性。确保您也拥有最新版本的 MSNPSharp。
You may just want to use the MessageManager property instead. Make sure you have the latest version of MSNPSharp too.