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:
DS_Starter
2019-12-02 20:16:48 +00:00
parent 26c334e74e
commit c33383d1e4

View File

@@ -1096,7 +1096,17 @@ sub SSChatBot_chatop_parse ($) {
delete($hash->{HELPER}{CL}); 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); SSChatBot_checkretry($name,0);
@@ -1603,11 +1613,11 @@ sub SSChatBot_CGI() {
} }
readingsBeginUpdate ($hash); readingsBeginUpdate ($hash);
readingsBulkUpdateIfChanged ($hash, "recChannelid", $channelid); readingsBulkUpdateIfChanged ($hash, "recChannelId", $channelid);
readingsBulkUpdateIfChanged ($hash, "recChannelname", $channelname); readingsBulkUpdateIfChanged ($hash, "recChannelname", $channelname);
readingsBulkUpdateIfChanged ($hash, "recUserid", $userid); readingsBulkUpdateIfChanged ($hash, "recUserId", $userid);
readingsBulkUpdateIfChanged ($hash, "recUsername", $username); readingsBulkUpdateIfChanged ($hash, "recUsername", $username);
readingsBulkUpdateIfChanged ($hash, "recPostid", $postid); readingsBulkUpdateIfChanged ($hash, "recPostId", $postid);
readingsBulkUpdateIfChanged ($hash, "recTimestamp", $timestamp); readingsBulkUpdateIfChanged ($hash, "recTimestamp", $timestamp);
readingsBulkUpdateIfChanged ($hash, "recText", $text); readingsBulkUpdateIfChanged ($hash, "recText", $text);
readingsBulkUpdateIfChanged ($hash, "recTriggerword", $triggerword); readingsBulkUpdateIfChanged ($hash, "recTriggerword", $triggerword);