def setRole(self, role): """Set user affiliation in channel :param role: user role :type role: str :return: self, for chain build :rtype: XmppLobbyMessageBuilder """ if role in XMPP_MUC_USER_TEMPLATE_GROUPS.keys(): self.__role = role self.__updateTemplateKey() return self
def setAffiliation(self, affiliation): """Set user affiliation for channel :param affiliation: user affiliation :type affiliation: str :return: self, for chain build :rtype: XmppLobbyMessageBuilder """ if affiliation in XMPP_MUC_USER_TEMPLATE_GROUPS.keys(): self.__affiliation = affiliation self.__updateTemplateKey() return self
def setRole(self, role): if role in XMPP_MUC_USER_TEMPLATE_GROUPS.keys(): self.__templateKey = XMPP_MUC_USER_TEMPLATE_GROUPS[role] return self
def setAffiliation(self, affiliation): if affiliation in XMPP_MUC_USER_TEMPLATE_GROUPS.keys(): self.__templateKey = XMPP_MUC_USER_TEMPLATE_GROUPS[affiliation] return self
def setRole(self, role): if role in XMPP_MUC_USER_TEMPLATE_GROUPS.keys(): self.__role = role self.__updateTemplateKey() return self
def setAffiliation(self, affiliation): if affiliation in XMPP_MUC_USER_TEMPLATE_GROUPS.keys(): self.__affiliation = affiliation self.__updateTemplateKey() return self