Skip to content

Commit

Permalink
'#2031: Show thumbnails for text messages too, if available.
Browse files Browse the repository at this point in the history
  • Loading branch information
wladimirleite committed Dec 22, 2023
1 parent d354cf3 commit 697ebc2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,12 @@ private synchronized void printMessage(PrintWriter out, Message message, boolean
if (message.getData() != null) {
out.print(format(message.getData()) + "<br/>"); //$NON-NLS-1$
}
// Some (rare) text messages have thumbs
thumb = message.getThumbData();
if (thumb != null) {
out.print("<img class=\"thumb\" src=\"");
out.print("data:image/jpg;base64," + Util.encodeBase64(thumb) + "\"/>");
}
break;
case UNKNOWN_MEDIA_MESSAGE:
if (message.getMediaCaption() != null) {
Expand Down

0 comments on commit 697ebc2

Please sign in to comment.