Skip to content

Commit 06084c2

Browse files
authored
fix typo and default value of animated (#417)
* fix typo and default value of animated * fix test
1 parent da6559f commit 06084c2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

linebot/models/flex_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def __init__(self,
501501
aspect_mode=None,
502502
background_color=None,
503503
action=None,
504-
animated=None,
504+
animated=False,
505505
**kwargs):
506506
"""__init__ method.
507507
@@ -524,7 +524,7 @@ def __init__(self,
524524
:param str background_color: Background color of the image. Use a hexadecimal color code.
525525
:param action: Action performed when this image is tapped
526526
:type action: list[T <= :py:class:`linebot.models.actions.Action`]
527-
:param bool action: True to play an animated image
527+
:param bool animated: True to play an animated image. Default is False.
528528
:param kwargs:
529529
"""
530530
super(ImageComponent, self).__init__(**kwargs)

tests/models/test_flex_message.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def test_image_component(self):
218218
arg = {
219219
'url': 'https://example.com/flex/images/image.jpg',
220220
'size': 'full',
221+
'animated': False,
221222
'aspect_ratio': '1.91:1'
222223
}
223224
self.assertEqual(
@@ -260,6 +261,7 @@ def test_video_component(self):
260261
"size": "full",
261262
"aspect_ratio": "20:13",
262263
"aspect_mode": "cover",
264+
"animated": False,
263265
"url": "https://example.com/image.jpg"
264266
},
265267
"aspect_ratio": "20:13"

0 commit comments

Comments
 (0)