Author: asterix Date: 2008-11-28 08:25:00 +0100 (Fri, 28 Nov 2008) New Revision: 10709
Modified: trunk/src/common/connection.py Log: no need to create html twice
Modified: trunk/src/common/connection.py =================================================================== --- trunk/src/common/connection.py 2008-11-27 06:43:29 UTC (rev 10708) +++ trunk/src/common/connection.py 2008-11-28 07:25:00 UTC (rev 10709) @@ -1075,7 +1075,8 @@ original_message=None, delayed=None): if not self.connection: return 1 - if msg and not xhtml and gajim.config.get('rst_formatting_outgoing_messages'): + if msg and not xhtml and gajim.config.get( + 'rst_formatting_outgoing_messages'): from common.rst_xhtml_generator import create_xhtml xhtml = create_xhtml(msg) if not msg and chatstate is None and form_node is None: @@ -1109,11 +1110,6 @@ tim = localtime() self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim, session)) return 3 - if msgtxt and not xhtml and gajim.config.get( - 'rst_formatting_outgoing_messages'): - # Generate a XHTML part using reStructured text markup - from common.rst_xhtml_generator import create_xhtml - xhtml = create_xhtml(msgtxt) if type_ == 'chat': msg_iq = common.xmpp.Message(to = fjid, body = msgtxt, typ = type_, xhtml = xhtml)