def gotAvatarImage(self, to, image):
pass
+ def gotSendRequest(self, fileReceive):
+ pass
+
def listSynchronized(self):
pass
def sendMessage(self, message, noerror):
if self.ready:
def failedMessage(ignored):
- if self.__class__ == GroupchatSwitchboardSession:
+ if isinstance(self, GroupchatSwitchboardSession):
tempmsncon.failedMessage(self.groupchat.roomJID(), message)
else:
tempmsncon.failedMessage(self.remoteUser, message)
def gotAvatarImage(self, to, image):
self.msncon.gotAvatarImage(to, image)
+
+ def gotSendRequest(self, fileReceive):
+ self.msncon.gotSendRequest(fileReceive)
def switchboardReady(self, switchboard):
LogEvent(INFO, self.ident)
def loggedIn(self):
if self.badConditions(): return
- if (not self.reply) and self.switchboardSession.__class__ == SwitchboardSession:
+ if (not self.reply) and isinstance(self.switchboardSession, SwitchboardSession):
def failCB(arg=None):
LogEvent(INFO, ident, "User has not joined after 30 seconds.")
self.switchboardSession.removeMe()
def userTyping(self, message):
if self.badConditions(): return
- if self.switchboardSession.__class__ == SwitchboardSession: # Ignore typing in groupchats
+ if isinstance(self.switchboardSession, SwitchboardSession): # Ignore typing in groupchats
if message.userHandle == self.switchboardSession.remoteUser:
self.switchboardSession.contactTyping()
def gotAvatarImage(self, to, image):
if self.badConditions(): return
self.switchboardSession.gotAvatarImage(to, image)
+
+ def gotSendRequest(self, fileReceive):
+ if self.badConditions():
+ fileReceive.accept(False)
+ return
+ LogEvent(INFO, self.switchboardSession.ident)
+ self.switchboardSession.gotSendRequest(fileReceive)