ability to set and receive an empty subject. fixes #2938
This commit is contained in:
parent
40abe05487
commit
852974efa7
|
@ -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>
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue