Skip to content

Commit 383e79e

Browse files
desokroshanrohandubal
authored andcommitted
Set RequestAttributes for requests sent to the lex bot (#830)
* Set RequestAttributes for requests sent to the bot * Changelog updates
1 parent e6d592d commit 383e79e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
* **AWS IoT**
2929
* Fixed the timestamp used for signing requests to AWS IoT by accounting for the offset specified in `SDKGlobalConfiguration`. See [issue #814](https://github.com/aws-amplify/aws-sdk-android/issues/814)
3030

31+
* **Amazon Lex**
32+
* Set user-specified `RequestAttributes` for the `PostContentRequest` sent to Amazon Lex bots. See [issue #801](https://github.com/aws-amplify/aws-sdk-android/issues/801)
33+
3134
## [Release 2.12.6](https://github.com/aws/aws-sdk-android/releases/tag/release_v2.12.6)
3235

3336
### Misc. Updates

aws-android-sdk-lex/src/main/java/com/amazonaws/mobileconnectors/lex/interactionkit/utils/CreateLexServiceRequest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ private static PostContentRequest generateRequestInternal(Map<String, String> se
121121

122122
request.setSessionAttributes(mapToBase64(newSessionAttributes));
123123

124+
// Set the request attributes
125+
if (requestAttributes != null) {
126+
request.setRequestAttributes(mapToBase64(requestAttributes));
127+
}
128+
124129
if (interactionConfig.getUserId() == null || interactionConfig.getUserId().isEmpty()) {
125130
final CognitoCredentialsProvider cognitoCredentialsProvider = (CognitoCredentialsProvider) credentialsProvider;
126131
request.setUserId(cognitoCredentialsProvider.getIdentityId());

0 commit comments

Comments
 (0)