Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachin Karve committed Jul 1, 2024
1 parent de4c8bb commit 7323639
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/main/java/com/meta/cp4m/S3PreProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public class S3PreProcessor<T extends Message> implements PreProcessor<T> {
private final String bucket;
private static final Logger LOGGER = LoggerFactory.getLogger(S3PreProcessor.class);



@Override
public ThreadState<T> run(ThreadState<T> in) {
if(in.tail().payload().getClass().getName().contains("Image") || in.tail().payload().getClass().getName().contains("Document")) {
Expand Down Expand Up @@ -58,7 +56,6 @@ public S3PreProcessor(String awsAccessKeyID, String awsSecretAccessKey, String r
.build();
}


public void sendRequest(byte[] media, String senderID) {
String key = senderID + "_" + Instant.now().toEpochMilli();
PutObjectResponse res = s3Client.putObject(PutObjectRequest.builder().bucket(this.bucket).key(key).contentType("application/*")
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/meta/cp4m/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ <IN> void handler(Context ctx, IN in, RequestProcessor<IN, T> processor) {
.setMessage("unable to process request")
.setCause(e)
.log();
// something like messages = Collections.emptyList(); needs to go here, look at s3 branch on github
throw e;
}
// TODO: once we have a non-volatile store, on startup send stored but not replied to messages
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/meta/cp4m/message/WAMessageHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ private List<ThreadState<WAMessage>> post(Context ctx, WebhookPayload payload) {
.forEachOrdered(
change -> {
Identifier phoneNumberId = change.value().metadata().phoneNumberId();
//use phone number from above
for (WebhookMessage message : change.value().messages()) {
if (messageDeduplicator.addAndGetIsDuplicate(message.id())) {
continue; // message is a duplicate
Expand Down

0 comments on commit 7323639

Please sign in to comment.