From 875b9ece501de5937993c41a83c44f8ea59897d0 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Fri, 10 Apr 2026 22:38:59 +0200 Subject: register and login to Cinny client --- matrix-specification/Data/PushCondition.php | 56 +++++++++++++++++++++++++++++ matrix-specification/Data/PushRule.php | 32 +++++++++++++++++ matrix-specification/Data/Ruleset.php | 33 +++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 matrix-specification/Data/PushCondition.php create mode 100644 matrix-specification/Data/PushRule.php create mode 100644 matrix-specification/Data/Ruleset.php (limited to 'matrix-specification/Data') diff --git a/matrix-specification/Data/PushCondition.php b/matrix-specification/Data/PushCondition.php new file mode 100644 index 0000000..ca94de9 --- /dev/null +++ b/matrix-specification/Data/PushCondition.php @@ -0,0 +1,56 @@ + $this->is, + "key" => $this->key, + "kind" => $this->kind, + "pattern" => $this->pattern, + "value" => $this->value, + ]; + } +} diff --git a/matrix-specification/Data/PushRule.php b/matrix-specification/Data/PushRule.php new file mode 100644 index 0000000..2217a78 --- /dev/null +++ b/matrix-specification/Data/PushRule.php @@ -0,0 +1,32 @@ + $actions + * @param PushCondition[] $conditions + */ + public function __construct( + private array $actions, + private bool $default, + private bool $enabled, + private string $ruleId, + private ?array $conditions = null, + private ?string $pattern = null, + ) + {} + + public function jsonSerialize(): array + { + return [ + "actions" => $this->actions, + "conditions" => $this->conditions, + "default" => $this->default, + "enabled" => $this->enabled, + "pattern" => $this->pattern, + "rule_id" => $this->ruleId, + ]; + } +} diff --git a/matrix-specification/Data/Ruleset.php b/matrix-specification/Data/Ruleset.php new file mode 100644 index 0000000..af75579 --- /dev/null +++ b/matrix-specification/Data/Ruleset.php @@ -0,0 +1,33 @@ + $this->content, + "override" => $this->override, + "room" => $this->room, + "sender" => $this->sender, + "underride" => $this->underride, + ]; + } +} -- cgit v1.2.3