From 66341046d2253c43fa85d301ccf53d9721243460 Mon Sep 17 00:00:00 2001
From: rabuzarus <rabuzarus@t-online.de>
Date: Sun, 20 Nov 2016 16:19:55 +0100
Subject: [PATCH] Bugfix: preview has sometimes phantom mentions and tags

---
 mod/item.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mod/item.php b/mod/item.php
index 29a2101355..0deade4181 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -744,6 +744,9 @@ function item_post(&$a) {
 
 	if($preview) {
 		require_once('include/conversation.php');
+		// We set the datarray ID to -1 because in preview mode the dataray
+		// doesn't have an ID.
+		$datarray["id"] = -1;
 		$o = conversation($a,array(array_merge($contact_record,$datarray)),'search', false, true);
 		logger('preview: ' . $o);
 		echo json_encode(array('preview' => $o));