remove nested if
@@ -222,8 +222,7 @@ public class RichMessageActionProcessor implements ALRichMessageListener {
}
public void makeFormRequest(final Context context, ALRichMessageModel.ALPayloadModel payloadModel) {
- if (payloadModel != null) {
- if (payloadModel.getAction() != null) {
+ if (payloadModel != null && payloadModel.getAction() != null) {
if (!TextUtils.isEmpty(payloadModel.getAction().getMessage())) {
sendMessage(payloadModel.getAction().getMessage(), getStringMap(payloadModel.getReplyMetadata()));
} else if (!TextUtils.isEmpty(payloadModel.getAction().getName())) {
@@ -249,7 +248,6 @@ public class RichMessageActionProcessor implements ALRichMessageListener {
}
}
}
- }
public void openWebLink(String formData, String formAction) {
Bundle bundle = new Bundle();
