Another friend fix

This commit is contained in:
John 2015-08-12 14:45:48 +03:00
parent da0366d02a
commit 156752b4a7
2 changed files with 3 additions and 4 deletions

View file

@ -1098,18 +1098,18 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
def __friendOnline(self, doId): def __friendOnline(self, doId):
friend = base.cr.identifyFriend(doId) friend = base.cr.identifyFriend(doId)
if friend != None: if friend:
self.setSystemMessage(doId, OTPLocalizer.WhisperFriendComingOnline % friend.getName()) self.setSystemMessage(doId, OTPLocalizer.WhisperFriendComingOnline % friend.getName())
def __friendOffline(self, doId): def __friendOffline(self, doId):
friend = base.cr.identifyFriend(doId) friend = base.cr.identifyFriend(doId)
if friend != None: if friend:
self.setSystemMessage(0, OTPLocalizer.WhisperFriendLoggedOut % friend.getName()) self.setSystemMessage(0, OTPLocalizer.WhisperFriendLoggedOut % friend.getName())
def clickedWhisper(self, doId): def clickedWhisper(self, doId):
friend = base.cr.identifyFriend(doId) friend = base.cr.identifyFriend(doId)
if friend != None: if friend:
messenger.send('clickedNametag', [friend]) messenger.send('clickedNametag', [friend])
self.chatMgr.whisperTo(friend.getName(), doId) self.chatMgr.whisperTo(friend.getName(), doId)

View file

@ -239,7 +239,6 @@ class TTSFriendsManagerUD(DistributedObjectGlobalUD):
friendId = friend[0] friendId = friend[0]
if friendId in self.onlineToons: if friendId in self.onlineToons:
self.sendUpdateToAvatarId(doId, 'friendOnline', [friendId]) self.sendUpdateToAvatarId(doId, 'friendOnline', [friendId])
self.sendUpdateToAvatarId(friendId, 'friendOnline', [doId])
def goingOffline(self, avId): def goingOffline(self, avId):
self.toonOffline(avId) self.toonOffline(avId)