Beispiel #1
0
 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);
 }
Beispiel #2
0
 /// <summary>
 /// Posts a message.
 /// </summary>
 /// <param name="message">The message.</param>
 public void PostMessage(string message)
 {
     MessagePosted?.Invoke(this, new MessagePostedEventArgs(_tag, message));
 }
Beispiel #3
0
 protected virtual void OnMessagePosted(NntpMessage e)
 {
     MessagePosted?.Invoke(this, e);
 }