-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Pass associatedLinkName to updateDispositionStatus() API #2787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
f7899cd
24d2e52
dd71f9b
442bc79
054ddc6
44ee9a3
355fb6d
558fbcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ import Long from "long"; | |
| import * as log from "../log"; | ||
| import { generate_uuid } from "rhea-promise"; | ||
| import { isBuffer } from "util"; | ||
| import { ClientEntityContext } from "../../src/clientEntityContext"; | ||
|
|
||
| // This is the only dependency we have on DOM types, so rather than require | ||
| // the DOM lib we can just shim this in. | ||
|
|
@@ -160,3 +161,23 @@ export function toBuffer(input: any): Buffer { | |
| return result; | ||
| } | ||
|
|
||
| /** | ||
| * Helper function to retrieve active receiver name, if it exists. | ||
| * | ||
| */ | ||
| export function getAssociatedReceiverName( | ||
| clientEntityContext: ClientEntityContext, | ||
| sessionId?: string | ||
| ): string { | ||
| let receiverName: string; | ||
| if (sessionId !== undefined) { | ||
| if (clientEntityContext.messageSessions[sessionId]) { | ||
| receiverName = clientEntityContext.messageSessions[sessionId].name; | ||
| } | ||
| } else if (clientEntityContext.batchingReceiver) { | ||
| receiverName = clientEntityContext.batchingReceiver.name; | ||
| } else if (clientEntityContext.streamingReceiver) { | ||
| receiverName = clientEntityContext.streamingReceiver.name; | ||
| } | ||
| return receiverName!; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the return value can be We use In this case, we define the variable |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the tag
@internalhere otherwise, the function gets picked up by our doc generation process. For example: https://docs.microsoft.com/en-us/javascript/api/%40azure/service-bus/index?view=azure-node-preview#functionsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't all of the methods in
utils.tsneed to be marked as internal?