(botIDList []string, permissionList []string)
| 121 | } |
| 122 | |
| 123 | func BuildBotChat(botIDList []string, permissionList []string) *Scope { |
| 124 | if len(permissionList) == 0 { |
| 125 | permissionList = []string{"Connector.botChat"} |
| 126 | } |
| 127 | |
| 128 | var attributeConstraint *ScopeAttributeConstraint |
| 129 | if len(botIDList) > 0 { |
| 130 | chatAttribute := &ScopeAttributeConstraintConnectorBotChatAttribute{ |
| 131 | BotIDList: botIDList, |
| 132 | } |
| 133 | attributeConstraint = &ScopeAttributeConstraint{ |
| 134 | ConnectorBotChatAttribute: chatAttribute, |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | return &Scope{ |
| 139 | AccountPermission: &ScopeAccountPermission{PermissionList: permissionList}, |
| 140 | AttributeConstraint: attributeConstraint, |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | // ScopeAccountPermission represents the account permissions in the scope |
| 145 | type ScopeAccountPermission struct { |
no outgoing calls