Skip to content
Snippets Groups Projects
Commit 852974ef authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

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

parent 40abe054
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment