2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 19:36:02 +00:00

50_TelegramBot.pm: Fixes for image captions and special chars in contacts

git-svn-id: https://svn.fhem.de/fhem/trunk@11548 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
viegener 2016-05-29 15:34:26 +00:00
parent 24c602612c
commit 320763758e
2 changed files with 6 additions and 0 deletions

View File

@ -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_TelegramBot: captions for Images / special chars in Contacts
- feature: YAMAHA_AVR: new set command presetUp and presetDown for preset - feature: YAMAHA_AVR: new set command presetUp and presetDown for preset
selection in the current input selection in the current input
- added: 52_I2C_GY30_BH1750FVI: modul i2c light intensity sensor - added: 52_I2C_GY30_BH1750FVI: modul i2c light intensity sensor

View File

@ -133,6 +133,9 @@
# added allowedCommands and doc (with modification of allowed_... device) # added allowedCommands and doc (with modification of allowed_... device)
# allowedCommands only modified on the allowed_... device # allowedCommands only modified on the allowed_... device
# 1.7 2016-05-05 reply set command / allowedCommands as restriction # 1.7 2016-05-05 reply set command / allowedCommands as restriction
# fix for addPar (Caption) on photos in SendIt
# fix for contact list UTF8 encoding on restart
# #
# #
############################################################################## ##############################################################################
@ -353,6 +356,7 @@ sub TelegramBot_State($$$$) {
# Log3 $hash->{NAME}, 4, "TelegramBot_State called with :$name: value :$value:"; # Log3 $hash->{NAME}, 4, "TelegramBot_State called with :$name: value :$value:";
if ($name eq 'Contacts') { if ($name eq 'Contacts') {
$value = TelegramBot_PutToUTF8( $value );
TelegramBot_CalcContactsHash( $hash, $value ); TelegramBot_CalcContactsHash( $hash, $value );
Log3 $hash->{NAME}, 4, "TelegramBot_State Contacts hash has now :".scalar(keys %{$hash->{Contacts}}).":"; Log3 $hash->{NAME}, 4, "TelegramBot_State Contacts hash has now :".scalar(keys %{$hash->{Contacts}}).":";
} }
@ -1258,6 +1262,7 @@ sub TelegramBot_SendIt($$$$$;$$)
# add caption # add caption
if ( defined( $addPar ) ) { if ( defined( $addPar ) ) {
$ret = TelegramBot_AddMultipart($hash, \%TelegramBot_hu_do_params, "caption", undef, $addPar, 0 ) if ( ! defined( $ret ) ); $ret = TelegramBot_AddMultipart($hash, \%TelegramBot_hu_do_params, "caption", undef, $addPar, 0 ) if ( ! defined( $ret ) );
$addPar = undef;
} }
# add msg or file or stream # add msg or file or stream