mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 18:56:03 +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:
parent
d3bf15279f
commit
442aac218b
@ -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: contact handling failed (/ in contact names ??)
|
||||||
- feature: new module 02_FTUISRV.pm for server side templates for tablet UI
|
- feature: new module 02_FTUISRV.pm for server side templates for tablet UI
|
||||||
- feature: 30_pilight_switch: new attribute 'sendCount' to send the
|
- feature: 30_pilight_switch: new attribute 'sendCount' to send the
|
||||||
command n times.
|
command n times.
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
# favorite list corrected
|
# favorite list corrected
|
||||||
# 1.6 2016-04-08 text customization for replies/messages and favorite descriptions
|
# 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 );
|
my $arg = join(" ", @args );
|
||||||
Log3 $name, 3, "TelegramBot_Set $name: set new contacts to :$arg: ";
|
Log3 $name, 3, "TelegramBot_Set $name: set new contacts to :$arg: ";
|
||||||
# first set the hash accordingly
|
# first set the hash accordingly
|
||||||
|
$arg = TelegramBot_PutToUTF8( $arg );
|
||||||
TelegramBot_CalcContactsHash($hash, $arg);
|
TelegramBot_CalcContactsHash($hash, $arg);
|
||||||
|
|
||||||
# then calculate correct string reading and put this into the reading
|
# 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:";
|
Log3 $hash->{NAME}, 5, "Contact add :$contact: cid is not number or -number:";
|
||||||
next;
|
next;
|
||||||
} else {
|
} else {
|
||||||
$cname =~ TelegramBot_encodeContactString( $cname );
|
$cname = TelegramBot_encodeContactString( $cname );
|
||||||
|
|
||||||
$cuser =~ TelegramBot_encodeContactString( $cuser );
|
$cuser = TelegramBot_encodeContactString( $cuser );
|
||||||
|
|
||||||
$hash->{Contacts}{$id} = $id.":".$cname.":".$cuser;
|
$hash->{Contacts}{$id} = $id.":".$cname.":".$cuser;
|
||||||
}
|
}
|
||||||
@ -2267,6 +2268,7 @@ sub TelegramBot_encodeContactString($) {
|
|||||||
$str =~ s/ /_/g;
|
$str =~ s/ /_/g;
|
||||||
|
|
||||||
return TelegramBot_GetUTF8Back( $str );
|
return TelegramBot_GetUTF8Back( $str );
|
||||||
|
# return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user