Skip to content

Commit

Permalink
Merge branch 'bugfix/ZCS-11145' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dasiyogesh committed Jan 21, 2022
2 parents 2991e70 + d2798f7 commit 826995d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions common/src/java/com/zimbra/common/localconfig/LC.java
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,8 @@ public enum PUBLIC_SHARE_VISIBILITY { samePrimaryDomain, all, none };
@Supported
public static final KnownKey delivery_report_enabled = KnownKey.newKey(true);

public static final KnownKey invite_ignore_x_alt_description = KnownKey.newKey(true);

static {
// Automatically set the key name with the variable name.
for (Field field : LC.class.getFields()) {
Expand Down
15 changes: 12 additions & 3 deletions store/src/java/com/zimbra/cs/mailbox/calendar/Invite.java
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,18 @@ public static Invite decodeMetadata(int mailboxId, Metadata meta, CalendarItem c
String descHtml = descInMeta ? meta.get(FN_DESC_HTML, null) : null;
String xDescHtml = descInMeta ? meta.get(FN_X_ZIMBRA_DESC_HTML, null) : null;

// if desc html is missing but desc is present
if (desc != null && descHtml == null) {
descHtml = Util.textToHtml(desc);
boolean hasXMicrosoftHeader = false;
for (Map.Entry<String, ?> entry : meta.asMap().entrySet()) {
if (entry.getValue().toString().contains("X-MICROSOFT-SKYPETEAMSMEETINGURL")) {
hasXMicrosoftHeader = true;
break;
}
}

// update HTML description if invite_ignore_x_alt_description is true
// and contains X-MICROSOFT headers
if (hasXMicrosoftHeader && !StringUtil.isNullOrEmpty(xDescHtml) && LC.invite_ignore_x_alt_description.booleanValue()) {
descHtml = xDescHtml;
}

long completed = meta.getLong(FN_COMPLETED, 0);
Expand Down

0 comments on commit 826995d

Please sign in to comment.