Changeset c82a88d


Ignore:
Timestamp:
2015-06-08T20:22:08Z (5 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
d832164
Parents:
d628339
Message:

Show presence as awayness instead of "onlineness".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/wa.py

    rd628339 rc82a88d  
    146146                        return
    147147               
    148                 status = 8 # MOBILE
    149                 if pres.getType() != "unavailable":
    150                         status |= 1 # ONLINE
     148                # Online/offline is not really how WA works. Let's show everyone
     149                # as online but unavailable folks as away. This also solves the
     150                # problem of offline->IRC /quit causing the persons to leave chat
     151                # channels as well (and not reappearing there when they return).
     152                status = 8 | 1  # MOBILE | ONLINE
     153                if pres.getType() == "unavailable":
     154                        status |= 4  # AWAY
    151155                self.cb.buddy_status(pres.getFrom(), status, None, None)
    152156               
     
    213217                if entity.invalidNumbers:
    214218                        self.cb.error("Invalid numbers: %s" %
    215                                       ", ".join(entity.invalidNumbers.keys()))
     219                                      ", ".join(entity.invalidNumbers))
    216220
    217221                # Disabled since yowsup won't give us the result...
     
    376380                self.bee.chat_add_buddy(id, self.account["user"])
    377381                for msg in group.setdefault("queue", []):
     382                        ## TODO: getBody fails for media msgs.
    378383                        self.bee.chat_msg(group["id"], msg.getParticipant(), msg.getBody(), 0, msg.getTimestamp())
    379384                del group["queue"]
Note: See TracChangeset for help on using the changeset viewer.