Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0085.py @ 663:8004c7d4aba7
core: Deferred in onMessage.
onMessage now use a deferred which is passed to MessageReceived trigger through the post_treat parameter. This can be used by plugins to add deferred in the callback chain.
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 31 Oct 2013 17:18:04 +0100 |
parents | 4f747d7fde8c |
children | 0c84fb112d70 |
comparison
equal
deleted
inserted
replaced
662:4f747d7fde8c | 663:8004c7d4aba7 |
---|---|
132 @param category: parameter category | 132 @param category: parameter category |
133 """ | 133 """ |
134 if (category, name) == (PARAM_KEY, PARAM_NAME): | 134 if (category, name) == (PARAM_KEY, PARAM_NAME): |
135 self.updateEntityData("@ALL@", True if value == "true" else "@NONE@", profile) | 135 self.updateEntityData("@ALL@", True if value == "true" else "@NONE@", profile) |
136 | 136 |
137 def messageReceivedTrigger(self, message, profile): | 137 def messageReceivedTrigger(self, message, post_treat, profile): |
138 """ | 138 """ |
139 Update the entity cache when we receive a message with body. | 139 Update the entity cache when we receive a message with body. |
140 Check for a check state in the incoming message and broadcast signal. | 140 Check for a check state in the incoming message and broadcast signal. |
141 """ | 141 """ |
142 if not self.host.memory.getParamA(PARAM_NAME, PARAM_KEY, profile_key=profile): | 142 if not self.host.memory.getParamA(PARAM_NAME, PARAM_KEY, profile_key=profile): |