From fcce353e111604c9c048c75e9759645f08835c43 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 17 Jun 2019 11:53:51 +0300 Subject: TwitterManager: do not overwrite top event message user --- src/main/java/com/juick/server/TwitterManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/juick/server') diff --git a/src/main/java/com/juick/server/TwitterManager.java b/src/main/java/com/juick/server/TwitterManager.java index 613594e6..d799bb17 100644 --- a/src/main/java/com/juick/server/TwitterManager.java +++ b/src/main/java/com/juick/server/TwitterManager.java @@ -22,6 +22,7 @@ import com.juick.service.UserService; import com.juick.service.component.*; import com.juick.service.CrosspostService; import com.juick.util.MessageUtils; +import org.apache.commons.lang3.SerializationUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -118,7 +119,7 @@ public class TwitterManager implements NotificationListener { @Override public void processTopEvent(TopEvent topEvent) { - Message jmsg = topEvent.getMessage(); + Message jmsg = SerializationUtils.clone(topEvent.getMessage()); jmsg.setUser(serviceUser); twitterPost(jmsg); } -- cgit v1.2.3