Пример #1
0
 /**
  * Indicates that a contact has changed its status.
  *
  * @param evt The presence event containing information about the contact status change.
  */
 public void contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt) {
   if (evt.getSourceContact().equals(contact)
       && !evt.getOldStatus().equals(evt.getNewStatus())
       && contactResource == null) // If the contact source is set then the
   // status will be updated from the
   // MetaContactChatSession.
   {
     this.updateContactStatus();
   }
 }
Пример #2
0
  /**
   * Updates contact source contacts with status.
   *
   * @param evt the ContactPresenceStatusChangeEvent describing the status
   */
  @Override
  public void contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt) {
    if (recentQuery == null) return;

    synchronized (recentMessages) {
      for (ComparableEvtObj msg : recentMessages) {
        if (msg.getContact() != null && msg.getContact().equals(evt.getSourceContact())) {
          recentQuery.updateContactStatus(msg, evt.getNewStatus());
        }
      }
    }
  }