Skip to content

Commit

Permalink
use channel instead of email
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobasco99 committed Jun 13, 2024
1 parent c030abc commit 70ff8fa
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ else if(count < 2){
message = "survey question request handled")})
public Response nextQuestion(@FormDataParam("msg") String msg, @FormDataParam("channel") String channel, @FormDataParam("sbfmUrl") @DefaultValue("default") String sbfmUrl,
@FormDataParam("intent") String intent, @FormDataParam("surveyID") String surveyID, @FormDataParam("Password") String password,
@FormDataParam("NameOfUser") String nameOfUser, @FormDataParam("email") String email, @FormDataParam("adminmail") String adminmail){
@FormDataParam("NameOfUser") String nameOfUser, @FormDataParam("adminmail") String adminmail){
//Context.get().monitorEvent(MonitoringEvent.MESSAGE_RECEIVED, input);

JSONObject response = new JSONObject();
Expand All @@ -1301,7 +1301,6 @@ public Response nextQuestion(@FormDataParam("msg") String msg, @FormDataParam("c
bodyInput.put("surveyID", surveyID);
bodyInput.put("Password", password);
bodyInput.put("NameOfUser", nameOfUser);
bodyInput.put("email", email);
bodyInput.put("adminmail", adminmail);

String input = bodyInput.toString();
Expand Down Expand Up @@ -1353,8 +1352,8 @@ public Response nextQuestion(@FormDataParam("msg") String msg, @FormDataParam("c
}
} catch (Exception ex){
// in case of telegram no email is passed on, so username is the 'email'
if(bodyInput.containsKey("user")){
senderEmail = bodyInput.getAsString("user");
if(bodyInput.containsKey("channel")){
senderEmail = bodyInput.getAsString("channel");
}
else{
System.out.println("channel, email or user is not transmitted correctly");
Expand Down

0 comments on commit 70ff8fa

Please sign in to comment.