Remove references to device-specific push rules. (#1842)

Device-specific push rules have never been implemented and aren't properly specified.
pull/1915/head
Patrick Cloke 4 months ago committed by GitHub
parent 9bac118aec
commit 56914b72ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1 @@
Remove references to device-specific push rules.

@ -33,3 +33,190 @@ properties:
$ref: push_rule.yaml $ref: push_rule.yaml
type: array type: array
type: object type: object
example: {
"content": [
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight"
}
],
"default": true,
"enabled": true,
"pattern": "alice",
"rule_id": ".m.rule.contains_user_name"
}
],
"override": [
{
"actions": [],
"conditions": [],
"default": true,
"enabled": false,
"rule_id": ".m.rule.master"
},
{
"actions": [],
"conditions": [
{
"key": "content.msgtype",
"kind": "event_match",
"pattern": "m.notice"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.suppress_notices"
}
],
"room": [],
"sender": [],
"underride": [
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "ring"
},
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.call.invite"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.call"
},
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight"
}
],
"conditions": [
{
"kind": "contains_display_name"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.contains_display_name"
},
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"kind": "room_member_count",
"is": "2"
},
{
"kind": "event_match",
"key": "type",
"pattern": "m.room.message"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.room_one_to_one"
},
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.room.member"
},
{
"key": "content.membership",
"kind": "event_match",
"pattern": "invite"
},
{
"key": "state_key",
"kind": "event_match",
"pattern": "@alice:example.com"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.invite_for_me"
},
{
"actions": [
"notify",
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.room.member"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.member_event"
},
{
"actions": [
"notify",
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.room.message"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.message"
}
]
}

@ -20,10 +20,8 @@ paths:
get: get:
summary: Retrieve all push rulesets. summary: Retrieve all push rulesets.
description: |- description: |-
Retrieve all push rulesets for this user. Clients can "drill-down" on Retrieve all push rulesets for this user. Currently the only push ruleset
the rulesets by suffixing a `scope` to this path e.g. defined is `global`.
`/pushrules/global/`. This will return a subset of this data under the
specified key e.g. the `global` key.
operationId: getPushRules operationId: getPushRules
security: security:
- accessTokenQuery: [] - accessTokenQuery: []
@ -44,200 +42,27 @@ paths:
title: Ruleset title: Ruleset
allOf: allOf:
- $ref: definitions/push_ruleset.yaml - $ref: definitions/push_ruleset.yaml
examples:
response:
value: {
"global": {
"content": [
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight"
}
],
"default": true,
"enabled": true,
"pattern": "alice",
"rule_id": ".m.rule.contains_user_name"
}
],
"override": [
{
"actions": [],
"conditions": [],
"default": true,
"enabled": false,
"rule_id": ".m.rule.master"
},
{
"actions": [],
"conditions": [
{
"key": "content.msgtype",
"kind": "event_match",
"pattern": "m.notice"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.suppress_notices"
}
],
"room": [],
"sender": [],
"underride": [
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "ring"
},
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.call.invite"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.call"
},
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight"
}
],
"conditions": [
{
"kind": "contains_display_name"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.contains_display_name"
},
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"kind": "room_member_count",
"is": "2"
},
{
"kind": "event_match",
"key": "type",
"pattern": "m.room.message"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.room_one_to_one"
},
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.room.member"
},
{
"key": "content.membership",
"kind": "event_match",
"pattern": "invite"
},
{
"key": "state_key",
"kind": "event_match",
"pattern": "@alice:example.com"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.invite_for_me"
},
{
"actions": [
"notify",
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.room.member"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.member_event"
},
{
"actions": [
"notify",
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.room.message"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.message"
}
]
}
}
tags: tags:
- Push notifications - Push notifications
"/pushrules/{scope}/{kind}/{ruleId}": /pushrules/global/:
get:
summary: Retrieve all push rules.
description: |-
Retrieve all push rules for this user.
operationId: getPushRulesGlobal
security:
- accessTokenQuery: []
- accessTokenBearer: []
responses:
"200":
description: All the push rules for this user.
content:
application/json:
schema:
$ref: definitions/push_ruleset.yaml
tags:
- Push notifications
"/pushrules/global/{kind}/{ruleId}":
get: get:
summary: Retrieve a push rule. summary: Retrieve a push rule.
description: Retrieve a single specified push rule. description: Retrieve a single specified push rule.
@ -246,13 +71,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -318,13 +136,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -395,13 +206,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -523,7 +327,7 @@ paths:
$ref: definitions/errors/rate_limited.yaml $ref: definitions/errors/rate_limited.yaml
tags: tags:
- Push notifications - Push notifications
"/pushrules/{scope}/{kind}/{ruleId}/enabled": "/pushrules/global/{kind}/{ruleId}/enabled":
get: get:
summary: Get whether a push rule is enabled summary: Get whether a push rule is enabled
description: This endpoint gets whether the specified push rule is enabled. description: This endpoint gets whether the specified push rule is enabled.
@ -532,15 +336,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: |-
Either `global` or `device/<profile_tag>` to specify global
rules or device rules for the given `profile_tag`.
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -604,13 +399,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -674,7 +462,7 @@ paths:
} }
tags: tags:
- Push notifications - Push notifications
"/pushrules/{scope}/{kind}/{ruleId}/actions": "/pushrules/global/{kind}/{ruleId}/actions":
get: get:
summary: The actions for a push rule summary: The actions for a push rule
description: This endpoint get the actions for the specified push rule. description: This endpoint get the actions for the specified push rule.
@ -683,15 +471,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: |-
Either `global` or `device/<profile_tag>` to specify global
rules or device rules for the given `profile_tag`.
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -764,13 +543,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true

Loading…
Cancel
Save