Skip to content

Commit 4f4784d

Browse files
numairawanBoShurik
authored andcommitted
Update ForceReply.php
Added input_field_placeholder field to change the reply input placeholder text.
1 parent 65f9b4a commit 4f4784d

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

src/Types/ForceReply.php

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class ForceReply extends BaseType
2828
*/
2929
protected static $map = [
3030
'force_reply' => true,
31+
'input_field_placeholder' => true,
3132
'selective' => true
3233
];
3334

@@ -38,6 +39,13 @@ class ForceReply extends BaseType
3839
*/
3940
protected $forceReply;
4041

42+
/**
43+
* The placeholder to be shown in the input field when the reply is active; 1-64 characters
44+
*
45+
* @var string
46+
*/
47+
protected $inputFieldPlaceholder;
48+
4149
/**
4250
* Optional. Use this parameter if you want to show the keyboard to specific users only.
4351
* Targets:
@@ -52,9 +60,10 @@ class ForceReply extends BaseType
5260
* @param bool $forceReply
5361
* @param bool|null $selective
5462
*/
55-
public function __construct($forceReply = true, $selective = null)
63+
public function __construct($forceReply = true, $inputFieldPlaceholder = false, $selective = null)
5664
{
5765
$this->forceReply = $forceReply;
66+
$this->inputFieldPlaceholder = $inputFieldPlaceholder;
5867
$this->selective = $selective;
5968
}
6069

@@ -66,6 +75,23 @@ public function isForceReply()
6675
return $this->forceReply;
6776
}
6877

78+
/**
79+
* @param string $inputFieldPlaceholder
80+
* @return void
81+
*/
82+
public function setInputFieldPlaceholder($inputFieldPlaceholder)
83+
{
84+
$this->inputFieldPlaceholder = $inputFieldPlaceholder;
85+
}
86+
87+
/**
88+
* @return string|null
89+
*/
90+
public function getInputFieldPlaceholder()
91+
{
92+
return $this->inputFieldPlaceholder;
93+
}
94+
6995
/**
7096
* @param bool $forceReply
7197
* @return void

0 commit comments

Comments
 (0)