Changeset 6488
- Timestamp:
- 06/16/06 18:09:46 (2 years ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
-
gajim-remote.py (modified) (2 diffs)
-
remote_control.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gajim-remote.py
r6479 r6488 127 127 ], 128 128 'send_message':[ 129 _('Sends new message to a contact in the roster. Both OpenPGP key '129 _('Sends new chat message to a contact in the roster. Both OpenPGP key ' 130 130 'and account are optional. If you want to set only \'account\', ' 131 131 'without \'OpenPGP key\', just set \'OpenPGP key\' to \'\'.'), 132 132 [ 133 133 ('jid', _('JID of the contact that will receive the message'), True), 134 (_('message'), _('message contents'), True), 135 (_('pgp key'), _('if specified, the message will be encrypted ' 136 'using this public key'), False), 137 (_('account'), _('if specified, the message will be sent ' 138 'using this account'), False), 139 ] 140 ], 141 'send_single_message':[ 142 _('Sends new single message to a contact in the roster. Both OpenPGP key ' 143 'and account are optional. If you want to set only \'account\', ' 144 'without \'OpenPGP key\', just set \'OpenPGP key\' to \'\'.'), 145 [ 146 ('jid', _('JID of the contact that will receive the message'), True), 147 (_('subject'), _('message subject'), True), 134 148 (_('message'), _('message contents'), True), 135 149 (_('pgp key'), _('if specified, the message will be encrypted ' … … 253 267 ''' Print retrieved result to the output ''' 254 268 if res is not None: 255 if self.command in ('open_chat', 'send_message', 's tart_chat'):256 if self.command == 'send_message':269 if self.command in ('open_chat', 'send_message', 'send_single_message', 'start_chat'): 270 if self.command in ('send_message', 'send_single_message'): 257 271 self.argv_len -= 2 258 272 -
trunk/src/remote_control.py
r6479 r6488 160 160 self.open_chat, 161 161 self.send_message, 162 self.send_single_message, 162 163 self.contact_info, 163 164 self.send_file, … … 252 253 def send_message(self, *args): 253 254 ''' send_message(jid, message, keyID=None, account=None) 254 send 'message' to 'jid', using account (optional) 'account'.255 send chat 'message' to 'jid', using account (optional) 'account'. 255 256 if keyID is specified, encrypt the message with the pgp key ''' 256 257 jid, message, keyID, account = self._get_real_arguments(args, 4) … … 265 266 connection = gajim.connections[connected_account] 266 267 res = connection.send_message(jid, message, keyID) 268 return True 269 return False 270 271 def send_single_message(self, *args): 272 ''' send_single_message(jid, subject, message, keyID=None, account=None) 273 send single 'message' to 'jid', using account (optional) 'account'. 274 if keyID is specified, encrypt the message with the pgp key ''' 275 jid, subject, message, keyID, account = self._get_real_arguments(args, 5) 276 if not jid or not message: 277 return None # or raise error 278 if not keyID: 279 keyID = '' 280 281 connected_account, contact = self.get_account_and_contact(account, jid) 282 283 if connected_account: 284 connection = gajim.connections[connected_account] 285 res = connection.send_message(jid, message, keyID, 286 type='normal', 287 subject=subject) 267 288 return True 268 289 return False … … 579 600 contact_info = method(INTERFACE)(contact_info) 580 601 send_message = method(INTERFACE)(send_message) 602 send_single_message = method(INTERFACE)(send_single_message) 581 603 send_file = method(INTERFACE)(send_file) 582 604 prefs_list = method(INTERFACE)(prefs_list)
