private void EncryptedChatOnUserKeyReceived(object sender, CryptedChatPlainUserEventArgs ea) { // if user doesnt exist in the DB at all, do if (!Constants.ApplicationDatabase.HasInfoForUser(ea.User.SkypeHandle)) { Constants.ApplicationDatabase.KnownUsers.Add( new UserInformation(ea.User.SkypeHandle)); DoAskAndAddIdentityForUser(ea.User); } var knownPubKeysForUser = Constants.ApplicationDatabase.GetUserInfoByName(ea.User.SkypeHandle) .KnownPublicKeys; var userPublicKeyBytes = ea.User.IdentityPublicKey; // see if blocked if (Constants.ApplicationDatabase .GetUserInfoByName(ea.User.SkypeHandle) .BlockIdentityQueries.Contains(UiUtils.GetIdentityFingerprint(userPublicKeyBytes))) return; // if the user exists but this is a new identity, do if (knownPubKeysForUser.Count(x => x.SequenceEqual(userPublicKeyBytes)) == 0) { DoAskAndAddIdentityForUser(ea.User); } }
private void EncryptedChatOnUserLeft(object sender, CryptedChatPlainUserEventArgs ea) { AddChatInfoLine("Skype name: '" + ea.User.SkypeHandle + "' seems to have left the chat (NOT sure)"); }
private void EncryptedChatOnUserJoined(object sender, CryptedChatPlainUserEventArgs ea) { AddChatInfoLine("Skype name: '" + ea.User.SkypeHandle + "' joined the chat"); }