From adba5974bae4da0def1f13d47cfcf28a37e3cf7a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Mon, 24 Mar 2014 21:38:02 -0700 Subject: Enabling the Feed and various bug fixes. * Fixing thread ordering. * Adding a limit of 5 threads per topic. * Changing frontend /account references to UserRecord. --- src/com/p4square/grow/model/Message.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/com/p4square/grow/model/Message.java') diff --git a/src/com/p4square/grow/model/Message.java b/src/com/p4square/grow/model/Message.java index ad02af9..9d33320 100644 --- a/src/com/p4square/grow/model/Message.java +++ b/src/com/p4square/grow/model/Message.java @@ -5,6 +5,7 @@ package com.p4square.grow.model; import java.util.Date; +import java.util.UUID; /** * A feed message. @@ -18,6 +19,13 @@ public class Message { private Date mCreated; private String mMessage; + /** + * @return a new message id. + */ + public static String generateId() { + return String.format("%x-%s", System.currentTimeMillis(), UUID.randomUUID().toString()); + } + /** * @return The id of the thread that the message belongs to. */ -- cgit v1.2.3