2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 07:19:24 +00:00

50_SSChatBot: contrib 1.0.0

git-svn-id: https://svn.fhem.de/fhem/trunk@20646 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2019-12-02 20:16:48 +00:00
parent 2736672377
commit 71f8275cdb

View File

@ -1095,8 +1095,18 @@ sub SSChatBot_chatop_parse ($) {
asyncOutput($hash->{HELPER}{CL}{1},"$out");
delete($hash->{HELPER}{CL});
} elsif ($opmode eq "sendItem") {
} elsif ($opmode eq "sendItem") {
my $postid = "";
my $idx = $hash->{OPIDX};
my $uid = $data{SSChatBot}{$name}{sendqueue}{entries}{$idx}{userid};
if($data->{data}{succ}{user_id_post_map}{$uid}) {
$postid = $data->{data}{succ}{user_id_post_map}{$uid};
}
readingsBeginUpdate ($hash);
readingsBulkUpdateIfChanged ($hash, "sendPostId", $postid);
readingsBulkUpdateIfChanged ($hash, "sendUserId", $uid);
readingsEndUpdate ($hash,1);
}
SSChatBot_checkretry($name,0);
@ -1603,11 +1613,11 @@ sub SSChatBot_CGI() {
}
readingsBeginUpdate ($hash);
readingsBulkUpdateIfChanged ($hash, "recChannelid", $channelid);
readingsBulkUpdateIfChanged ($hash, "recChannelId", $channelid);
readingsBulkUpdateIfChanged ($hash, "recChannelname", $channelname);
readingsBulkUpdateIfChanged ($hash, "recUserid", $userid);
readingsBulkUpdateIfChanged ($hash, "recUserId", $userid);
readingsBulkUpdateIfChanged ($hash, "recUsername", $username);
readingsBulkUpdateIfChanged ($hash, "recPostid", $postid);
readingsBulkUpdateIfChanged ($hash, "recPostId", $postid);
readingsBulkUpdateIfChanged ($hash, "recTimestamp", $timestamp);
readingsBulkUpdateIfChanged ($hash, "recText", $text);
readingsBulkUpdateIfChanged ($hash, "recTriggerword", $triggerword);