Versions in this module Expand all Collapse all v0 v0.14.1 Jan 16, 2025 v0.14.0 Dec 18, 2024 Changes in this version + const MRuleCall + const MRuleContainsDisplayName + const MRuleContainsUserName + const MRuleEncrypted + const MRuleEncryptedRoomOneToOne + const MRuleInviteForMe + const MRuleMaster + const MRuleMemberEvent + const MRuleMessage + const MRuleReaction + const MRuleRoomACLs + const MRuleRoomNotif + const MRuleRoomOneToOne + const MRuleSuppressNotices + const MRuleTombstone + func BoolTweakOr(tweaks map[string]interface{}, key TweakKey, def bool) bool + func ValidateRule(kind Kind, rule *Rule) []error + type AccountRuleSets struct + Global RuleSet + func DefaultAccountRuleSets(localpart string, serverName spec.ServerName) *AccountRuleSets + type Action struct + Kind ActionKind + Tweak TweakKey + Value interface{} + func (a *Action) MarshalJSON() ([]byte, error) + func (a *Action) UnmarshalJSON(bs []byte) error + type ActionKind string + const CoalesceAction + const DontNotifyAction + const NotifyAction + const SetTweakAction + const UnknownAction + func ActionsToTweaks(as []*Action) (ActionKind, map[string]interface{}, error) + type Condition struct + Is string + Key string + Kind ConditionKind + Pattern *string + type ConditionKind string + const ContainsDisplayNameCondition + const EventMatchCondition + const RoomMemberCountCondition + const SenderNotificationPermissionCondition + const UnknownCondition + type EvaluationContext interface + HasPowerLevel func(senderID spec.SenderID, levelKey string) (bool, error) + RoomMemberCount func() (int, error) + UserDisplayName func() string + type Kind string + const ContentKind + const OverrideKind + const RoomKind + const SenderKind + const UnderrideKind + const UnknownKind + type Rule struct + Actions []*Action + Conditions []*Condition + Default bool + Enabled bool + Pattern *string + RuleID string + type RuleSet struct + Content []*Rule + Override []*Rule + Room []*Rule + Sender []*Rule + Underride []*Rule + func DefaultGlobalRuleSet(localpart string, serverName spec.ServerName) *RuleSet + type RuleSetEvaluator struct + func NewRuleSetEvaluator(ec EvaluationContext, ruleSet *RuleSet) *RuleSetEvaluator + func (rse *RuleSetEvaluator) MatchEvent(event gomatrixserverlib.PDU, userIDForSender spec.UserIDForSender) (*Rule, error) + type Scope string + const GlobalScope + const UnknownScope + type TweakKey string + const HighlightTweak + const SoundTweak + const UnknownTweak