Class PushApi.Rule

  • Enclosing interface:
    PushApi

    public static class PushApi.Rule
    extends Object
    Homeservers can specify "server-default rules" which operate at a lower priority than "user-defined rules". The rule_id for all server-default rules MUST start with a dot (".") to identify them as "server-default".
    • Field Detail

      • MASTER

        public static final String MASTER
        Matches all events, this can be enabled to turn off all push notifications other than those generated by override rules set by the user. By default this rule is disabled.
        See Also:
        Constant Field Values
      • SUPPRESS_NOTICES

        public static final String SUPPRESS_NOTICES
        Matches messages with a msgtype of notice. This should be an override rule so that it takes priority over content/sender/room rules.
        See Also:
        Constant Field Values
      • INVITE_FOR_ME

        public static final String INVITE_FOR_ME
        Matches any invites to a new room for this user.
        See Also:
        Constant Field Values
      • CONTAINS_DISPLAY_NAME

        public static final String CONTAINS_DISPLAY_NAME
        Matches any message whose content is unencrypted and contains the user's current display name in the room in which it was sent.
        See Also:
        Constant Field Values
      • ROOM_NOTIF

        public static final String ROOM_NOTIF
        Matches any message whose content is unencrypted and contains the text @room, signifying the whole room should be notified of the event.
        See Also:
        Constant Field Values
      • CONTAINS_USER_NAME

        public static final String CONTAINS_USER_NAME
        Matches any message whose content is unencrypted and contains the local part of the user's Matrix ID, separated by word boundaries.
        See Also:
        Constant Field Values
      • ENCRYPTED_ROOM_ONE_TO_ONE

        public static final String ENCRYPTED_ROOM_ONE_TO_ONE
        Matches any encrypted event sent in a room with exactly two members. Unlike other push rules, this rule cannot be matched against the content of the event by nature of it being encrypted. This causes the rule to be an "all or nothing" match where it either matches all events that are encrypted (in 1:1 rooms) or none.
        See Also:
        Constant Field Values
      • ROOM_ONE_TO_ONE

        public static final String ROOM_ONE_TO_ONE
        Matches any message sent in a room with exactly two members.
        See Also:
        Constant Field Values
      • ENCRYPTED

        public static final String ENCRYPTED
        Matches all encrypted events. Unlike other push rules, this rule cannot be matched against the content of the event by nature of it being encrypted. This causes the rule to be an "all or nothing" match where it either matches all events that are encrypted (in 1:1 rooms) or none.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Rule

        protected Rule()