diff --git a/api/src/main/java/com/messagebird/objects/integrations/HSMComponent.java b/api/src/main/java/com/messagebird/objects/integrations/HSMComponent.java index c13f276..4e3fe64 100644 --- a/api/src/main/java/com/messagebird/objects/integrations/HSMComponent.java +++ b/api/src/main/java/com/messagebird/objects/integrations/HSMComponent.java @@ -166,10 +166,9 @@ private void checkHeaderText() throws IllegalArgumentException { * @throws IllegalArgumentException Occurs when type is not {@code HEADER} and format is not {@code IMAGE}. */ private void checkHeaderUrl() throws IllegalArgumentException { - if (!(type.equals(HSMComponentType.HEADER) - && format.equals(HSMComponentFormat.IMAGE)) - ) { - throw new IllegalArgumentException("\"header_url\" is available for only HEADER type and IMAGE format."); + if (!(type.equals(HSMComponentType.HEADER) && + (format.equals(HSMComponentFormat.IMAGE) || format.equals(HSMComponentFormat.VIDEO) || format.equals(HSMComponentFormat.DOCUMENT)))) { + throw new IllegalArgumentException("\"header_url\" is available for only HEADER type and IMAGE, VIDEO and DOCUMENT format."); } } }