2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 13:24:56 +00:00

50_TelegramBot: contact handling failed (/ in contact names ??)

git-svn-id: https://svn.fhem.de/fhem/trunk@11323 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
viegener 2016-04-26 22:33:24 +00:00
parent d3bf15279f
commit 442aac218b
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# 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.
- bugfix: 50_TelegramBot: contact handling failed (/ in contact names ??)
- feature: new module 02_FTUISRV.pm for server side templates for tablet UI
- feature: 30_pilight_switch: new attribute 'sendCount' to send the
command n times.

View File

@ -124,7 +124,7 @@
# favorite list corrected
# 1.6 2016-04-08 text customization for replies/messages and favorite descriptions
#
# Fix: contact handling failed (/ in contact names ??)
#
#
##############################################################################
@ -455,6 +455,7 @@ sub TelegramBot_Set($@)
my $arg = join(" ", @args );
Log3 $name, 3, "TelegramBot_Set $name: set new contacts to :$arg: ";
# first set the hash accordingly
$arg = TelegramBot_PutToUTF8( $arg );
TelegramBot_CalcContactsHash($hash, $arg);
# then calculate correct string reading and put this into the reading
@ -2137,9 +2138,9 @@ sub TelegramBot_CalcContactsHash($$)
Log3 $hash->{NAME}, 5, "Contact add :$contact: cid is not number or -number:";
next;
} else {
$cname =~ TelegramBot_encodeContactString( $cname );
$cname = TelegramBot_encodeContactString( $cname );
$cuser =~ TelegramBot_encodeContactString( $cuser );
$cuser = TelegramBot_encodeContactString( $cuser );
$hash->{Contacts}{$id} = $id.":".$cname.":".$cuser;
}
@ -2267,6 +2268,7 @@ sub TelegramBot_encodeContactString($) {
$str =~ s/ /_/g;
return TelegramBot_GetUTF8Back( $str );
# return $str;
}
#####################################