if (message.isDiscussion()) {
continue;
}
TrashVersion trashVersion = trashVersionLocalService.fetchVersion(
trashEntryId, MBMessage.class.getName(),
<BUG>message.getMessageId());
int oldStatus = trashVersion.getStatus();
message.setStatus(oldStatus);</BUG>
mbMessagePersistence.update(message);
userIds.add(message.getUserId());

if (message.isDiscussion()) {
continue;
}
TrashVersion trashVersion = trashVersionLocalService.fetchVersion(
trashEntryId, MBMessage.class.getName(),
message.getMessageId());
int oldStatus = WorkflowConstants.STATUS_APPROVED;
if (trashVersion != null) {
oldStatus = trashVersion.getStatus();
}
message.setStatus(oldStatus);
mbMessagePersistence.update(message);
userIds.add(message.getUserId());
