Changeset 9953 for trunk/src/chat_control.py
- Timestamp:
- 07/18/08 22:24:34 (5 months ago)
- Files:
-
- 1 modified
-
trunk/src/chat_control.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/chat_control.py
r9940 r9953 46 46 constants = Constants() 47 47 from common.rst_xhtml_generator import create_xhtml 48 from common.xmpp.protocol import NS_XHTML, NS_FILE, NS_MUC, NS_ ESESSION48 from common.xmpp.protocol import NS_XHTML, NS_FILE, NS_MUC, NS_RECEIPTS, NS_ESESSION 49 49 50 50 try: … … 661 661 def print_conversation_line(self, text, kind, name, tim, 662 662 other_tags_for_name=[], other_tags_for_time=[], other_tags_for_text=[], 663 count_as_new=True, subject=None, old_kind=None, xhtml=None, simple=False ):663 count_as_new=True, subject=None, old_kind=None, xhtml=None, simple=False, xep0184_id = None): 664 664 '''prints 'chat' type messages''' 665 665 jid = self.contact.jid … … 672 672 other_tags_for_name, other_tags_for_time, other_tags_for_text, 673 673 subject, old_kind, xhtml, simple=simple) 674 675 if xep0184_id is not None: 676 textview.show_xep0184_warning(xep0184_id) 674 677 675 678 if not count_as_new: … … 1539 1542 self._schedule_activity_timers() 1540 1543 1541 if ChatControlBase.send_message(self, message, keyID, 1542 type = 'chat', chatstate = chatstate_to_send, 1543 composing_xep = composing_xep, 1544 process_command = process_command): 1544 id = ChatControlBase.send_message(self, message, keyID, 1545 type = 'chat', chatstate = chatstate_to_send, 1546 composing_xep = composing_xep, 1547 process_command = process_command) 1548 if id: 1549 # XXX: Once we have fallback to disco, remove 1550 # notexistant check 1551 if gajim.capscache.is_supported(contact, NS_RECEIPTS) \ 1552 and not gajim.capscache.is_supported(contact, 1553 'notexistant') and gajim.config.get_per('accounts', 1554 self.account, 'request_receipt'): 1555 xep0184_id = id 1556 else: 1557 xep0184_id = None 1558 1545 1559 self.print_conversation(message, self.contact.jid, 1546 encrypted = encrypted )1560 encrypted = encrypted, xep0184_id = xep0184_id) 1547 1561 1548 1562 def check_for_possible_paused_chatstate(self, arg): … … 1630 1644 1631 1645 def print_conversation(self, text, frm='', tim=None, encrypted=False, 1632 subject=None, xhtml=None, simple=False ):1646 subject=None, xhtml=None, simple=False, xep0184_id=None): 1633 1647 # TODO: contact? ITYM frm. 1634 1648 '''Print a line in the conversation: … … 1684 1698 ChatControlBase.print_conversation_line(self, text, kind, name, tim, 1685 1699 subject=subject, old_kind=self.old_msg_kind, xhtml=xhtml, 1686 simple=simple )1700 simple=simple, xep0184_id=xep0184_id) 1687 1701 if text.startswith('/me ') or text.startswith('/me\n'): 1688 1702 self.old_msg_kind = None
