ability to set and receive an empty subject. fixes #2938

This commit is contained in:
Yann Leboulanger 2007-01-26 18:30:45 +00:00
parent 40abe05487
commit 852974efa7
2 changed files with 2 additions and 2 deletions

View File

@ -1459,7 +1459,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
has_timestamp = False
if msg.timestamp:
has_timestamp = True
if subject:
if subject != None:
self.dispatch('GC_SUBJECT', (frm, subject, msgtxt, has_timestamp))
else:
if not msg.getTag('body'): #no <body>

View File

@ -394,7 +394,7 @@ class Message(Protocol):
Protocol.__init__(self, 'message', to=to, typ=typ, attrs=attrs, frm=frm, payload=payload, timestamp=timestamp, xmlns=xmlns, node=node)
if body: self.setBody(body)
if xhtml: self.setXHTML(xhtml)
if subject: self.setSubject(subject)
if subject != None: self.setSubject(subject)
def getBody(self):
""" Returns text of the message. """
return self.getTagData('body')