Changeset 8683 for branches/gajim_0.11.1/src/chat_control.py
- Timestamp:
- 08/31/07 19:22:58 (15 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11.1/src/chat_control.py (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11.1/src/chat_control.py
r8601 r8683 511 511 512 512 def send_message(self, message, keyID = '', type = 'chat', chatstate = None, 513 msg_id = None, composing_ jep = None, resource = None):513 msg_id = None, composing_xep = None, resource = None): 514 514 '''Send the given message to the active tab. Doesn't return None if error 515 515 ''' … … 521 521 ret = MessageControl.send_message(self, message, keyID, type = type, 522 522 chatstate = chatstate, msg_id = msg_id, 523 composing_ jep = composing_jep, resource = resource,523 composing_xep = composing_xep, resource = resource, 524 524 user_nick = self.user_nick) 525 525 if ret: … … 1084 1084 if contact.show == 'offline': 1085 1085 chatstate = '' 1086 elif contact.composing_ jep == 'JEP-0085':1086 elif contact.composing_xep == 'XEP-0085': 1087 1087 if st == 'all' or cs == 'composing': 1088 1088 chatstate = helpers.get_uf_chatstate(cs) 1089 1089 else: 1090 1090 chatstate = '' 1091 elif contact.composing_ jep == 'JEP-0022':1091 elif contact.composing_xep == 'XEP-0022': 1092 1092 if cs in ('composing', 'paused'): 1093 1093 # only print composing, paused … … 1161 1161 chatstates_on = gajim.config.get('outgoing_chat_state_notifications') != \ 1162 1162 'disabled' 1163 composing_ jep = contact.composing_jep1163 composing_xep = contact.composing_xep 1164 1164 chatstate_to_send = None 1165 1165 if chatstates_on and contact is not None: 1166 if composing_ jep is None:1166 if composing_xep is None: 1167 1167 # no info about peer 1168 1168 # send active to discover chat state capabilities … … 1170 1170 # because we want it sent with REAL message 1171 1171 # (not standlone) eg. one that has body 1172 1173 #FIXME: 1174 # Enable 3 next lines after 0.11 release. 1175 # Having this disabled violate xep85 5.1.2 but then we don't break 1176 # notifications between 0.10.1 and 0.11 See #2637 1177 # if contact.our_chatstate: 1178 # # We already ask for xep 85, don't ask it twice 1179 # composing_jep = 'asked_once' 1172 1173 if contact.our_chatstate: 1174 # We already asked for xep 85, don't ask it twice 1175 composing_xep = 'asked_once' 1180 1176 1181 1177 chatstate_to_send = 'active' … … 1183 1179 # if peer supports jep85 and we are not 'ask', send 'active' 1184 1180 # NOTE: first active and 'ask' is set in gajim.py 1185 elif composing_ jep is not False:1181 elif composing_xep is not False: 1186 1182 #send active chatstate on every message (as JEP says) 1187 1183 chatstate_to_send = 'active' … … 1193 1189 1194 1190 if not ChatControlBase.send_message(self, message, keyID, type = 'chat', 1195 chatstate = chatstate_to_send, composing_ jep = composing_jep):1191 chatstate = chatstate_to_send, composing_xep = composing_xep): 1196 1192 self.print_conversation(message, self.contact.jid, 1197 1193 encrypted = encrypted) … … 1486 1482 return 1487 1483 1488 if contact.composing_ jep is False: # jid cannot do jep85 nor jep221484 if contact.composing_xep is False: # jid cannot do xep85 nor xep22 1489 1485 return 1490 1486 … … 1494 1490 return 1495 1491 1496 if contact.composing_ jep is None:1492 if contact.composing_xep is None: 1497 1493 # we don't know anything about jid, so return 1498 1494 # NOTE: … … 1508 1504 # in JEP22, when we already sent stop composing 1509 1505 # notification on paused, don't resend it 1510 if contact.composing_ jep == 'JEP-0022' and \1506 if contact.composing_xep == 'XEP-0022' and \ 1511 1507 contact.our_chatstate in ('paused', 'active', 'inactive') and \ 1512 1508 state is not 'composing': # not composing == in (active, inactive, gone) … … 1530 1526 1531 1527 MessageControl.send_message(self, None, chatstate = state, 1532 msg_id = contact.msg_id, composing_ jep = contact.composing_jep)1528 msg_id = contact.msg_id, composing_xep = contact.composing_xep) 1533 1529 contact.our_chatstate = state 1534 1530 if contact.our_chatstate == 'active':
