Example #1
0
 /** Change the status This changes the status of thsi instance. */
 private void changeInstanceStatus(int status, String messageText) {
   if (master == this) {
     if (status == Presence.UNAVAILABLE) {
       jeti.saveOpenGroups();
       backend.disconnect();
     } else {
       backend.changeStatus(status, messageText);
     }
   } else {
     String statusText;
     switch (status) {
       case Presence.INVISIBLE:
         statusText = "invisible";
         break;
       case Presence.UNAVAILABLE:
         statusText = "unavailable";
         break;
       default:
         statusText = "available";
         break;
     }
     backend.send(new Presence(jid, statusText, status, messageText));
   }
 }
Example #2
0
 private void sendChat(JIDStatus jidStatus) {
   main.chat(jidStatus);
 }