Change summary
src/main/java/eu/siacs/conversations/entities/Message.java | 4
src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 1
2 files changed, 5 insertions(+)
Detailed changes
@@ -1354,6 +1354,10 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
return result;
}
+ public synchronized void clearLinkDescriptions() {
+ this.payloads.removeAll(getLinkDescriptions());
+ }
+
public String getMimeType() {
String extension;
if (relativeFilePath != null) {
@@ -1912,6 +1912,7 @@ public class XmppConnectionService extends Service {
boolean waitForPreview = false;
if (getPreferences().getBoolean("send_link_previews", true) && !previewedLinks && !message.needsUploading() && message.getEncryption() != Message.ENCRYPTION_AXOLOTL) {
+ message.clearLinkDescriptions();
final List<URI> links = message.getLinks();
if (!links.isEmpty()) {
waitForPreview = true;