Skip to content

Commit b71d5d7

Browse files
authored
Merge pull request #203692 from JialinXin/patch-10
Fix `WebPubSubContext`
2 parents 467ad7e + 8101e49 commit b71d5d7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/azure-web-pubsub/reference-functions-bindings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: vicancy
55
ms.author: lianwei
66
ms.service: azure-web-pubsub
77
ms.topic: conceptual
8-
ms.date: 11/08/2021
8+
ms.date: 07/04/2022
99
---
1010

1111
# Azure Web PubSub trigger and bindings for Azure Functions
@@ -318,9 +318,9 @@ public static object Run(
318318
{
319319
if (wpsContext.IsPreflight || !wpsContext.HasError)
320320
{
321-
return wpsReq.Response;
321+
return wpsContext.Response;
322322
}
323-
var request = wpsReq.Request as ConnectEventRequest;
323+
var request = wpsContext.Request as ConnectEventRequest;
324324
var response = new ConnectEventResponse
325325
{
326326
UserId = wpsContext.Request.ConnectionContext.UserId
@@ -365,7 +365,7 @@ module.exports = async function (context, req, wpsContext) {
365365
if (!wpsContext.hasError || wpsContext.isPreflight)
366366
{
367367
console.log(`invalid request: ${wpsContext.response.message}.`);
368-
return wpsReq.response;
368+
return wpsContext.response;
369369
}
370370
console.log(`user: ${wpsContext.connectionContext.userId} is connecting.`);
371371
return { body: {"userId": wpsContext.connectionContext.userId} };
@@ -599,4 +599,4 @@ You can also easily [enable console logging](https://github.com/Azure/azure-sdk-
599599

600600
## Next steps
601601

602-
[!INCLUDE [next step](includes/include-next-step.md)]
602+
[!INCLUDE [next step](includes/include-next-step.md)]

0 commit comments

Comments
 (0)