Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def update_contact_infos(self, contact, infos):
def callback():
contact._server_infos_changed(infos)
up = scenario.ContactUpdatePropertiesScenario(self._ab,
(callback,),
(self.__common_errback,))
up.contact_guid = contact.id
up.contact_properties = infos
up()
def upgrade_mail_contact(self, contact, groups=[],
done_cb=None, failed_cb=None):
def callback():
contact._add_membership(Membership.ALLOW)
for group in groups:
self.add_contact_to_group(group, contact)
self.__common_callback(None, done_cb)
up = scenario.ContactUpdatePropertiesScenario(self._ab,
(callback,), (self.__common_errback, failed_cb))
up.contact_guid = contact.id
up.contact_properties = { 'is_messenger_user' : True }
up.enable_allow_list_management = True
up()
def upgrade_mail_contact(self, contact, groups=[],
done_cb=None, failed_cb=None):
logger.info('upgrade mail contact: %s' % str(contact))
def callback():
contact._add_membership(Membership.ALLOW)
for group in groups:
self.add_contact_to_group(group, contact)
self.__common_callback(None, done_cb, contact)
up = scenario.ContactUpdatePropertiesScenario(self._ab,
(callback,), (self.__common_errback, failed_cb))
up.contact_guid = contact.id
up.contact_properties = { 'is_messenger_user' : True }
up.enable_allow_list_management = True
up()
def update_contact_infos(self, contact, infos, done_cb=None, failed_cb=None):
def callback():
contact._server_infos_changed(infos)
self.__common_callback(None, done_cb, contact)
up = scenario.ContactUpdatePropertiesScenario(self._ab,
(callback,),
(self.__common_errback, failed_cb))
up.contact_guid = contact.id
up.contact_properties = infos
up()
def upgrade_mail_contact(self, contact, groups=[],
done_cb=None, failed_cb=None):
def callback():
contact._add_membership(Membership.ALLOW)
for group in groups:
self.add_contact_to_group(group, contact)
self.__common_callback(None, done_cb)
up = scenario.ContactUpdatePropertiesScenario(self._ab,
(callback,), (self.__common_errback, failed_cb))
up.contact_guid = contact.id
up.contact_properties = { 'is_messenger_user' : True }
up.enable_allow_list_management = True
up()
def update_contact_infos(self, contact, infos, done_cb=None, failed_cb=None):
def callback():
contact._server_infos_changed(infos)
self.__common_callback(None, done_cb)
up = scenario.ContactUpdatePropertiesScenario(self._ab,
(callback,),
(self.__common_errback, failed_cb))
up.contact_guid = contact.id
up.contact_properties = infos
up()