fix Meta Data Store
This commit is contained in:
parent
2c09928a5e
commit
c7f2b07345
@ -362,7 +362,7 @@ __END__
|
||||
|
||||
=end html_DE
|
||||
|
||||
=for :application/json;q=META.json 70_Matrix.pm.pm
|
||||
=for :application/json;q=META.json 70_Matrix.pm
|
||||
{
|
||||
"abstract": "Provides a Matrix-Chatbot",
|
||||
"x_lang": {
|
||||
@ -391,7 +391,7 @@ __END__
|
||||
"carp": 0,
|
||||
"POSIX": 0,
|
||||
"JSON::PP": 0,
|
||||
"encode": 0,
|
||||
"encode": 0
|
||||
},
|
||||
"recommends": {
|
||||
"JSON": 0
|
||||
|
@ -1,2 +1,2 @@
|
||||
UPD 2023-01-04_18:41:07 16959 FHEM/70_Matrix.pm
|
||||
UPD 2023-01-04_19:01:30 51934 lib/FHEM/Devices/Matrix/Client.pm
|
||||
UPD 2023-01-04_19:32:50 16955 FHEM/70_Matrix.pm
|
||||
UPD 2023-01-04_19:32:46 51750 lib/FHEM/Devices/Matrix/Client.pm
|
||||
|
@ -16,6 +16,7 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
use HttpUtils;
|
||||
use FHEM::Meta;
|
||||
use JSON;
|
||||
use GPUtils qw(GP_Import);
|
||||
use FHEM::Core::Authentication::Passwords qw(:ALL);
|
||||
@ -122,8 +123,9 @@ sub Define {
|
||||
my $version;
|
||||
|
||||
return $@ unless ( FHEM::Meta::SetInternals($hash) );
|
||||
|
||||
$version = FHEM::Meta::Get( $hash, 'version' );
|
||||
use version 0.77; our $VERSION = $version;
|
||||
our $VERSION = $version;
|
||||
|
||||
return 'too few parameters: define <name> Matrix <server> <user>'
|
||||
if ( scalar( @{$aArg} ) != 4 );
|
||||
@ -133,7 +135,7 @@ sub Define {
|
||||
$hash->{SERVER} = $aArg->[2]; # Internals sollten groß geschrieben werden
|
||||
$hash->{URL} = 'https://' . $hash->{SERVER} . '/_matrix/client/';
|
||||
$hash->{USER} = $aArg->[3];
|
||||
$hash->{VERSION} = $VERSION;
|
||||
$hash->{VERSION} = version->parse($VERSION)->normal;
|
||||
|
||||
$hash->{helper}->{passwdobj} =
|
||||
FHEM::Core::Authentication::Passwords->new( $hash->{TYPE} );
|
||||
@ -177,14 +179,6 @@ sub _Init { # wir machen daraus eine privat function (CoolTux)
|
||||
Log3( $name, 4,
|
||||
"$name : Matrix::_Init $hash " . AttrVal( $name, 'matrixPoll', '-1' ) );
|
||||
|
||||
# Update necessary?
|
||||
Log3( $name, 1,
|
||||
$name
|
||||
. ': Start V'
|
||||
. $hash->{VERSION} . ' -> V'
|
||||
. FHEM::Meta::Get( $hash, 'version' ) )
|
||||
if ( $hash->{VERSION} );
|
||||
|
||||
return ::readingsSingleUpdate( $hash, 'state', 'please set password first',
|
||||
1 )
|
||||
if (
|
||||
|
Loading…
Reference in New Issue
Block a user