plugin XEP-0085: renamed "__xxx" methods to "_xxx"

This commit is contained in:
Goffi 2015-11-06 17:09:45 +01:00
commit 83eef838a6

View file

@ -184,7 +184,7 @@ class XEP_0085(object):
pass
# send our next "composing" states to any MUC and to the contacts who enabled the feature
self.__chatStateInit(from_jid, message.getAttribute("type"), profile)
self._chatStateInit(from_jid, message.getAttribute("type"), profile)
state_list = [child.name for child in message.elements() if
message.getAttribute("type") in MESSAGE_TYPES
@ -214,7 +214,7 @@ class XEP_0085(object):
# launch the chat state machine (init the timer)
if self._isMUC(to_jid, profile):
to_jid = to_jid.userhostJID()
self.__chatStateActive(to_jid, mess_data["type"], profile)
self._chatStateActive(to_jid, mess_data["type"], profile)
except StopIteration:
if "chat_state" in mess_data["extra"]:
state = mess_data["extra"].pop("chat_state")
@ -266,7 +266,7 @@ class XEP_0085(object):
# wait for the first message before sending states
return False
def __chatStateInit(self, to_jid, mess_type, profile):
def _chatStateInit(self, to_jid, mess_type, profile):
"""
Data initialization for the chat state machine.
@ -282,7 +282,7 @@ class XEP_0085(object):
mess_type, profile)
self.map[profile][to_jid] = machine
def __chatStateActive(self, to_jid, mess_type, profile_key):
def _chatStateActive(self, to_jid, mess_type, profile_key):
"""
Launch the chat state machine on "active" state.
@ -293,7 +293,7 @@ class XEP_0085(object):
profile = self.host.memory.getProfileName(profile_key)
if profile is None:
raise exceptions.ProfileUnknownError
self.__chatStateInit(to_jid, mess_type, profile)
self._chatStateInit(to_jid, mess_type, profile)
self.map[profile][to_jid]._onEvent("active")
def chatStateComposing(self, to_jid_s, profile_key):