Ejemplo n.º 1
0
	def send_message(self, recipient, message):
		jid, exclude_resources, include_states = base_jabber.validate_recipient(recipient)
		client = SendJabberClient(self.jid, self.password, jid, message, exclude_resources.__contains__, include_states.__contains__)
		client.connect()
		client.loop_timeout(self.timeout)
		client.disconnect_once()
		if client.failure:
			raise client.failure
Ejemplo n.º 2
0
	def send_message(self, recipient, message):
		jid, exclude_resources, include_states = base_jabber.validate_recipient(recipient)
		# The following raises a number of pynotifyd exceptions.
		self.client_thread.send_message(jid, message, exclude_resources.__contains__, include_states.__contains__)