mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Add support for link preview descriptions.
This commit is contained in:
@@ -1118,7 +1118,7 @@ public class MmsDatabase extends MessageDatabase {
|
||||
if (preview.getAttachmentId() != null) {
|
||||
DatabaseAttachment attachment = attachmentIdMap.get(preview.getAttachmentId());
|
||||
if (attachment != null) {
|
||||
previews.add(new LinkPreview(preview.getUrl(), preview.getTitle(), attachment));
|
||||
previews.add(new LinkPreview(preview.getUrl(), preview.getTitle(), preview.getDescription(), attachment));
|
||||
}
|
||||
} else {
|
||||
previews.add(preview);
|
||||
@@ -1526,7 +1526,7 @@ public class MmsDatabase extends MessageDatabase {
|
||||
attachmentId = insertedAttachmentIds.get(preview.getThumbnail().get());
|
||||
}
|
||||
|
||||
LinkPreview updatedPreview = new LinkPreview(preview.getUrl(), preview.getTitle(), attachmentId);
|
||||
LinkPreview updatedPreview = new LinkPreview(preview.getUrl(), preview.getTitle(), preview.getDescription(), attachmentId);
|
||||
linkPreviewJson.put(new JSONObject(updatedPreview.serialize()));
|
||||
} catch (JSONException | IOException e) {
|
||||
Log.w(TAG, "Failed to serialize shared contact. Skipping it.", e);
|
||||
|
||||
Reference in New Issue
Block a user