Skip to content

Commit 94dc893

Browse files
ews: use attachment displayname as fallback
Use PR_DISPLAY_NAME property if PR_ATTACH_LONG_FILENAME is not set.
1 parent 5acf3a8 commit 94dc893

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exch/ews/structures.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ tAlternateId::tAlternateId(Enum::IdFormatType format, std::string id, std::strin
13261326
tAttachment::tAttachment(const sAttachmentId& aid, const sShape& shape)
13271327
{
13281328
AttachmentId.emplace(aid);
1329-
fromProp(shape.get(PR_ATTACH_LONG_FILENAME), Name);
1329+
fromProp(shape.get(PR_ATTACH_LONG_FILENAME), Name) || fromProp(shape.get(PR_DISPLAY_NAME), Name);
13301330
fromProp(shape.get(PR_ATTACH_MIME_TAG), ContentType);
13311331
fromProp(shape.get(PR_ATTACH_CONTENT_ID), ContentId);
13321332
fromProp(shape.get(PR_ATTACH_SIZE), Size);

exch/ews/structures.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ struct tAttachment : public NS_EWS_Types {
521521
static sAttachment create(const sAttachmentId&, sShape&&);
522522

523523
std::optional<sAttachmentId> AttachmentId;
524-
std::optional<std::string> Name;///< PR_ATTACH_LONG_FILENAM
524+
std::optional<std::string> Name;///< PR_ATTACH_LONG_FILENAME or PR_DISPLAYNAME
525525
std::optional<std::string> ContentType; ///< PR_ATTACH_MIME_TAG
526526
std::optional<std::string> ContentId; ///< PR_ATTACH_CONTENT_ID
527527
std::optional<std::string> ContentLocation;

0 commit comments

Comments
 (0)