Skip to content

Commit 53fc465

Browse files
authored
Editorial: clarify Receiving a Push Message
This makes it more clearly talk about bytes rather than plain text. It also turns a redundant requirement into a statement of fact.
1 parent 3a1f3d6 commit 53fc465

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

index.html

+15-18
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ <h2>
978978
};
979979
</pre>
980980
<p>
981-
<a>PushMessageData</a> objects have an associated <dfn>bytes</dfn> (a [=byte sequence=]),
981+
{{PushMessageData}} objects have an associated <dfn>bytes</dfn> (a [=byte sequence=]),
982982
which is set on creation.
983983
</p>
984984
<p>
@@ -1123,32 +1123,29 @@ <h2>
11231123
</li>
11241124
<li>Let |subscription| be the active <a>push subscription</a> for |registration|.
11251125
</li>
1126-
<li>Initialize |data| to a value of `null`.
1126+
<li>Let |bytes| be null.
11271127
</li>
1128-
<li>If the <a>push message</a> contains a payload, perform the following steps:
1128+
<li>If the <a>push message</a> contains a payload:
11291129
<ol>
1130-
<li>Decrypt the <a>push message</a> using the private key from the key pair
1131-
associated with |subscription| and the process described in [[RFC8291]]. This
1132-
produces the plain text of the message.
1130+
<li>Decrypt the <a>push message</a> payload using the private key from the key pair
1131+
associated with |subscription| and the process described in [[RFC8291]]. Set |bytes|
1132+
to the resulting [=/byte sequence=].
11331133
</li>
1134-
<li>If the <a>push message</a> could not be decrypted for any reason, perform the
1135-
following steps:
1134+
<li>If the <a>push message</a> payload could not be decrypted for any reason:
11361135
<ol>
11371136
<li>Acknowledge the receipt of the <a>push message</a> according to [[RFC8030]].
11381137
Though the message was not successfully received and processed, this prevents the
11391138
push service from attempting to retransmit the message; a badly encrypted message
11401139
is not recoverable.
11411140
</li>
1142-
<li>Discard the <a>push message</a>.
1141+
<li>Abort these steps.
11431142
</li>
1144-
<li>Terminate this process.
1145-
</li>
1146-
</ol>A `push` event MUST NOT be fired for a <a>push message</a> that was not
1147-
successfully decrypted using the key pair associated with the <a>push
1148-
subscription</a>.
1149-
</li>
1150-
<li>Let |data| be a new <a>PushMessageData</a> instance with the decrypted plain text
1151-
of the <a>push message</a>.
1143+
</ol>
1144+
<p class="note">
1145+
A `push` event will not be fired for a <a>push message</a> that was not
1146+
successfully decrypted using the key pair associated with the <a>push
1147+
subscription</a>.
1148+
</p>
11521149
</li>
11531150
</ol>
11541151
</li>
@@ -1162,7 +1159,7 @@ <h2>
11621159
`data`
11631160
</dt>
11641161
<dd>
1165-
|data|
1162+
A new {{PushMessageData}} object whose [=bytes=] is |bytes|.
11661163
</dd>
11671164
</dl>
11681165
<p>

0 commit comments

Comments
 (0)