diff --git a/java/org/servalproject/servaldna/meshms/MeshMSMessage.java b/java/org/servalproject/servaldna/meshms/MeshMSMessage.java index 60dc885a..798a70fc 100644 --- a/java/org/servalproject/servaldna/meshms/MeshMSMessage.java +++ b/java/org/servalproject/servaldna/meshms/MeshMSMessage.java @@ -40,6 +40,7 @@ public class MeshMSMessage { public final String text; public final boolean isDelivered; public final boolean isRead; + public final long timestamp; public final Long ackOffset; protected MeshMSMessage(int rowNumber, @@ -51,6 +52,7 @@ public class MeshMSMessage { String text, boolean delivered, boolean read, + long timestamp, Long ack_offset) throws ServalDInterfaceException { if (my_sid == null) @@ -72,6 +74,7 @@ public class MeshMSMessage { this.text = text; this.isDelivered = delivered; this.isRead = read; + this.timestamp = timestamp; this.ackOffset = ack_offset; } diff --git a/java/org/servalproject/servaldna/meshms/MeshMSMessageList.java b/java/org/servalproject/servaldna/meshms/MeshMSMessageList.java index 5d777556..75e22a37 100644 --- a/java/org/servalproject/servaldna/meshms/MeshMSMessageList.java +++ b/java/org/servalproject/servaldna/meshms/MeshMSMessageList.java @@ -66,6 +66,7 @@ public class MeshMSMessageList { .addColumn("text", String.class, JSONTokeniser.Narrow.ALLOW_NULL) .addColumn("delivered", Boolean.class) .addColumn("read", Boolean.class) + .addColumn("timestamp", Long.class) .addColumn("ack_offset", Long.class, JSONTokeniser.Narrow.ALLOW_NULL); } @@ -156,6 +157,7 @@ public class MeshMSMessageList { (String)row.get("text"), (Boolean)row.get("delivered"), (Boolean)row.get("read"), + (Long)row.get("timestamp"), (Long)row.get("ack_offset") ); } diff --git a/java/org/servalproject/test/Meshms.java b/java/org/servalproject/test/Meshms.java index 355c2ddf..ed74d85c 100644 --- a/java/org/servalproject/test/Meshms.java +++ b/java/org/servalproject/test/Meshms.java @@ -20,7 +20,6 @@ package org.servalproject.test; -import java.io.IOException; import org.servalproject.servaldna.ServalDClient; import org.servalproject.servaldna.ServalDInterfaceException; import org.servalproject.servaldna.ServerControl; @@ -32,6 +31,8 @@ import org.servalproject.servaldna.meshms.MeshMSMessage; import org.servalproject.servaldna.meshms.MeshMSMessageList; import org.servalproject.servaldna.meshms.MeshMSStatus; +import java.io.IOException; + public class Meshms { static void meshms_list_conversations(SubscriberId sid) throws ServalDInterfaceException, IOException, InterruptedException @@ -80,6 +81,7 @@ public class Meshms { + ", text=" + (msg.text == null ? null : msg.text.replace('\n', '.').replace(' ', '.')) + ", delivered=" + msg.isDelivered + ", read=" + msg.isRead + + ", timestamp=" + msg.timestamp + ", ack_offset=" + msg.ackOffset ); } @@ -110,6 +112,7 @@ public class Meshms { + ", text=" + (msg.text == null ? null : msg.text.replace('\n', '.').replace(' ', '.')) + ", delivered=" + msg.isDelivered + ", read=" + msg.isRead + + ", timestamp=" + msg.timestamp + ", ack_offset=" + msg.ackOffset ); }