Skip to content

Commit

Permalink
checks if it's latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Ícaro Erasmo Souza Barreiro committed Oct 3, 2024
1 parent 3b0f05b commit c6124c2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/icaroerasmo/enums/MatchTypeEnum.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.icaroerasmo.enums;

public enum MatchTypeEnum {
SNAPSHOT, LATEST;
}
8 changes: 8 additions & 0 deletions src/main/java/com/icaroerasmo/listeners/CamListener.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.icaroerasmo.listeners;

import com.google.gson.Gson;
import com.icaroerasmo.enums.MatchTypeEnum;
import com.icaroerasmo.enums.QueueType;
import org.eclipse.paho.client.mqttv3.IMqttClient;
import org.eclipse.paho.client.mqttv3.IMqttMessageListener;
Expand All @@ -27,6 +28,13 @@ public class CamListener extends AbstractListener {

for(Map<String, Object> match : matches) {

String type = (String) match.get("type");

if(MatchTypeEnum.SNAPSHOT.equals(
MatchTypeEnum.valueOf(type.toUpperCase()))) {
continue;
}

String name = (String) match.get("name");
final String base64Image = (String) match.get("base64");

Expand Down

0 comments on commit c6124c2

Please sign in to comment.