public void EncryptedRead(int chatid, int maxdate, int date) { var chats = from dialog in dialogs where dialog.IsEncrypted && ((DialogModelEncrypted)dialog).Id == chatid select dialog; if (chats.Any()) { DialogModelEncrypted dialog = (DialogModelEncrypted)chats.First(); dialog.MarkEncryptedRead(maxdate, date); } }
public void EncryptedTyping(int chatid) { var chats = from dialog in dialogs where dialog.IsEncrypted && ((DialogModelEncrypted)dialog).Id == chatid select dialog; if (chats.Any()) { DialogModelEncrypted dialog = (DialogModelEncrypted)chats.First(); dialog.SetTyping(); } }