-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding UUIDs to MessageRequests and MessageResponses (#2240)
* Adding UUIDs to MessageRequests and MessageResponses * Committing changefile * Added in MessageID and MessageUUID types, added in testing for UUID communication and id as numbers communication * Changing waitForResponse to have input of type MessageUUID * Updated references to use MessageID and MessageUUID * Fixed lint error * Created BaseUUID type * Added validation for uuid to handleParentMessage * Only validate UUIDs if there is one * Added in MessageUUID object * Testing new changes to UUID * Added in serialization of objects * Updated to address PR feedback * Added comment describing MessageID vs MessageUUID * Added in helper function * Removing comment since map.delete was verified to work correctly * Moved uuid object to interfaces.ts for more general use * Replaced Function in Map declarations * Updated to use serialized and deserialized Message Response objects * Added in unit tests for UUID class * Fixed lint error * Updating tests * Moved uuid object to new file uuidObject.ts, edited changefile verbage * Added in unit tests for testing callback map deletion and functionality * Removed unnused import * Added in logging for when a callbackID fails to be generated * Fixed a typo in communication spec * Updated serialization and deserialization and uuid toString function * Reverted toString() change due to compatibility issues * Removing unnecessary map clear due to already clearing in uninitialize and removeHandlers * Fixed an issue with removing message ids * Reverting uuid back to private --------- Co-authored-by: Trevor Harris <trharris@microsoft.com> Co-authored-by: AE ( ͡ಠ ʖ̯ ͡ಠ) <36546967+AE-MS@users.noreply.github.com>
- Loading branch information
1 parent
451b835
commit 42c114e
Showing
12 changed files
with
563 additions
and
152 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@microsoft-teams-js-acd75970-b390-4cfe-b488-4bd6f51f723e.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "Added `uuid` parameter to `MessageRequest` and `MessageResponse` interfaces", | ||
"packageName": "@microsoft/teams-js", | ||
"email": "jadahiya@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { generateGUID, validateUuid } from './utils'; | ||
|
||
/** | ||
* @internal | ||
* Limited to Microsoft-internal use | ||
* | ||
* UUID object | ||
*/ | ||
export class UUID { | ||
public constructor(private readonly uuid: string = generateGUID()) { | ||
validateUuid(uuid); | ||
} | ||
|
||
public toString(): string { | ||
return this.uuid; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.