xmpp_server Module

Server for sending and receiving XMPP messages.

The primary purpose of this class is to communicate with the legacy server for fetching old client data. If that changes, all of the legacy functions and constants should be moved to a separate module.

At some point, the legacy functions and constants should be retired.

class xmpp_server.ChatHandler(request=None, response=None)[source]

Bases: task_handler.TaskHandler

Receive XMPP chat messages for application.

class xmpp_server.MessageQueueHandler(request=None, response=None)[source]

Bases: task_handler.TaskHandler

Send queued XMPP messages.

post(namespace=None, domain=None, user=None)[source]
class xmpp_server.ResendXmppRequestsHandler(request=None, response=None)[source]

Bases: task_handler.TaskHandler

Retry XMPP messages that have been sent and had no status update.

get(namespace=None, client_id_str=None)[source]
xmpp_server.queue_message(destination, message_str, transactional=False)[source]

Enqueue an XMPP message.

Parameters :

destination : string

The destination should be a valid JID.

message_str : string

The body of the XMPP message to be sent.

transactional : bool, optional

Whether or not the message should be transactionally enqueued.


To embed destinations in logs, the JID is currently split into the user and domain. If the JID includes a resource, this will fail. To enable resource strings, either modify the regex for domain to support including or replacing a ‘/’, or pass the destination as a post argument instead.

xmpp_server.send_legacy_message(*args, **kwds)[source]
xmpp_server.send_legacy_message_inner(client_id, client, current_time, namespace)[source]

Previous topic

util_test Module

Next topic

xmpp_server_test Module

This Page