From b08047ba485f86038f33175162943c0a9878ab1a Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Fri, 19 Sep 2025 17:03:47 +0200 Subject: add separate matrix specification package --- matrix-specification/UserIdentifier.php | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 matrix-specification/UserIdentifier.php (limited to 'matrix-specification/UserIdentifier.php') diff --git a/matrix-specification/UserIdentifier.php b/matrix-specification/UserIdentifier.php new file mode 100644 index 0000000..63f939a --- /dev/null +++ b/matrix-specification/UserIdentifier.php @@ -0,0 +1,45 @@ + $this->type, + ]; + + $userIdentifier += match ($this->type) { + UserIdentifierType::USER => [ + "user" => $this->user, + ], + + UserIdentifierType::THIRDPARTY => [ + "medium" => $this->thirdPartyMedium, + "address" => $this->thirdPartyAddress, + ], + + UserIdentifierType::PHONE => [ + "country" => $this->phoneCountry, + "phone" => $this->phoneNumber, + ], + + default => [], + }; + + return $userIdentifier; + } +} -- cgit v1.2.3