def as_temba(self): temba_contact = TembaContact() temba_contact.name = self.full_name temba_contact.urns = [self.urn] temba_contact.fields = {self.org.get_chat_name_field(): self.chat_name} temba_contact.groups = [self.room.uuid] temba_contact.uuid = self.uuid return temba_contact
def as_temba(self): groups = [self.region.uuid] if self.group_id: groups.append(self.group.uuid) temba_contact = TembaContact() temba_contact.name = self.name temba_contact.urns = [self.urn] temba_contact.fields = {self.org.facility_code_field: self.facility_code} temba_contact.groups = groups temba_contact.language = self.language temba_contact.uuid = self.uuid return temba_contact
def as_temba(self): groups = [self.region.uuid] if self.group_id: groups.append(self.group.uuid) temba_contact = TembaContact() temba_contact.name = self.name temba_contact.urns = [self.urn] temba_contact.fields = {self.org.get_facility_code_field(): self.facility_code} temba_contact.groups = groups temba_contact.language = self.language temba_contact.uuid = self.uuid return temba_contact