How to use the scenario.ContactUpdatePropertiesScenario function in scenario

To help you get started, we’ve selected a few scenario examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github drf / amsn2 / pymsn / pymsn / service / AddressBook / address_book.py View on Github external
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()
github Kjir / papyon / papyon / service / AddressBook / address_book.py View on Github external
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()
github emesene / emesene / emesene / e3 / papylib / papyon / papyon / service / AddressBook / address_book.py View on Github external
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()
github emesene / emesene / emesene / e3 / papylib / papyon / papyon / service / AddressBook / address_book.py View on Github external
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()
github emesene / emesene / mesinyer / papyon / service / AddressBook / address_book.py View on Github external
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()
github Kjir / papyon / papyon / service / AddressBook / address_book.py View on Github external
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()