mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
50_SSChatBot: fix cannot send after receiving anything
git-svn-id: https://svn.fhem.de/fhem/trunk@23250 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a78e27f9a0
commit
f0385bf118
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 50_SSChatBot: fix cannot send after receiving anything
|
||||||
- feature 76_SMAPortal: integrate SMA EV Charger
|
- feature 76_SMAPortal: integrate SMA EV Charger
|
||||||
- change: 14_SD_BELL: revised code Perl::Critic
|
- change: 14_SD_BELL: revised code Perl::Critic
|
||||||
- feature: 14_SD_UT.pm
|
- feature: 14_SD_UT.pm
|
||||||
|
@ -135,6 +135,7 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
|
"1.12.1" => "28.11.2020 fix cannot send after received anything, fix greedy regex in _botCGIcheckData ",
|
||||||
"1.12.0" => "23.11.2020 generate event CHAT_INITIALIZED when users are once loaded, Forum: https://forum.fhem.de/index.php/topic,105714.msg1103700.html#msg1103700 ".
|
"1.12.0" => "23.11.2020 generate event CHAT_INITIALIZED when users are once loaded, Forum: https://forum.fhem.de/index.php/topic,105714.msg1103700.html#msg1103700 ".
|
||||||
"postpone new operation is one ist still running ",
|
"postpone new operation is one ist still running ",
|
||||||
"1.11.7" => "01.11.2020 quotation marks can be used in text tag of received messages (__botCGIcheckData) ",
|
"1.11.7" => "01.11.2020 quotation marks can be used in text tag of received messages (__botCGIcheckData) ",
|
||||||
@ -1477,8 +1478,6 @@ sub _botCGIdata {
|
|||||||
|
|
||||||
Log3($name, 4, "$name - received data decoded:\n".Dumper($h));
|
Log3($name, 4, "$name - received data decoded:\n".Dumper($h));
|
||||||
|
|
||||||
$hash->{OPMODE} = "receiveData";
|
|
||||||
|
|
||||||
# ausgehende Datenfelder (Chat -> FHEM), die das Chat senden kann
|
# ausgehende Datenfelder (Chat -> FHEM), die das Chat senden kann
|
||||||
# ===============================================================
|
# ===============================================================
|
||||||
# token: bot token
|
# token: bot token
|
||||||
@ -1575,10 +1574,10 @@ sub __botCGIcheckData {
|
|||||||
$args = urlDecode($args);
|
$args = urlDecode($args);
|
||||||
|
|
||||||
my $ca = $args;
|
my $ca = $args;
|
||||||
my ($teco) = $ca =~ /text="(.*)"/x; # " im Text-Tag escapen (V: 1.11.7)
|
my ($teco) = $ca =~ /text="(.*?)"/x; # " im Text-Tag escapen (V: 1.11.7), fix greedy Regex V1.12.1
|
||||||
if ($teco) {
|
if ($teco) {
|
||||||
$teco =~ s/"/_ESC_/gx;
|
$teco =~ s/"/_ESC_/gx;
|
||||||
$ca =~ s/text="(.*)"/text="$teco"/x;
|
$ca =~ s/text="(.*?)"/text="$teco"/x; # fix greedy Regex V1.12.1
|
||||||
}
|
}
|
||||||
|
|
||||||
my($a,$h) = parseParams($ca);
|
my($a,$h) = parseParams($ca);
|
||||||
@ -1602,9 +1601,9 @@ sub __botCGIcheckData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $dat = {
|
my $dat = {
|
||||||
name => $name,
|
name => $name,
|
||||||
args => $args,
|
args => $args,
|
||||||
h => $h,
|
h => $h,
|
||||||
};
|
};
|
||||||
|
|
||||||
return ('','',$dat);
|
return ('','',$dat);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user