internal void SetLastMessageId(long ChatId, int MessageId) { if (LastMessageIds.ContainsKey(ChatId)) { LastMessageIds[ChatId] = MessageId; } else { LastMessageIds.Add(ChatId, MessageId); } try { if (Machines.ContainsKey(Convert.ToInt32(ChatId))) { Machines[Convert.ToInt32(ChatId)].SetLastMessageId(MessageId); } } catch { } MessagePosted?.Invoke(ChatId, MessageId); }
/// <summary> /// Posts a message. /// </summary> /// <param name="message">The message.</param> public void PostMessage(string message) { MessagePosted?.Invoke(this, new MessagePostedEventArgs(_tag, message)); }
protected virtual void OnMessagePosted(NntpMessage e) { MessagePosted?.Invoke(this, e); }