Skip to content

Commit

Permalink
Es Lint fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcameron1231 committed Oct 2, 2023
1 parent 969f4e4 commit 6f63e99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
9 changes: 3 additions & 6 deletions packages/graph/cloud-communications/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export class _Presence extends _GraphInstance<IUserPresence> {
* @param presence Presence object to set the state of a user's presence session
*/
public async setPresence(presence: ISetPresenceOptions): Promise<void> {

const postBody = { ...presence };
return graphPost(Presence(this, "setPresence"), body(postBody));
}
Expand All @@ -27,7 +26,6 @@ export class _Presence extends _GraphInstance<IUserPresence> {
* @param sessionId Id of the application to clear presence
*/
public async clearPresence(sessionId: string): Promise<void> {

const postBody = { sessionId };
return graphPost(Presence(this, "clearPresence"), body(postBody));
}
Expand Down Expand Up @@ -59,18 +57,17 @@ export class _Presence extends _GraphInstance<IUserPresence> {
}

}
export interface IPresence extends _Presence { }
export interface IPresence extends _Presence {}
export const Presence = graphInvokableFactory<IPresence>(_Presence);

@defaultPath("communications")
export class _Communications extends _GraphCollection<IUserPresence[]> {
/**
* Retrieve presence information for a group of users.
* Retrieve presence information for a group of users
*
* @param ids An array of user id's to retrieve presence for.
*/
public async getPresencesByUserId(ids: string[]): Promise<IUserPresence[]> {

const postBody = { ids };
return graphPost(Communications(this, "getPresencesByUserId"), body(postBody));
}
Expand All @@ -89,4 +86,4 @@ export interface ISetPresenceOptions extends IPresenceOptions {
export interface IPresenceStatusMessage {
message: ItemBody;
expiryDateTime: DateTimeTimeZone;
}
}
10 changes: 5 additions & 5 deletions test/graph/cloud-communications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("Cloud-Communications", function () {
const presence = await this.pnp.graph.communications.getPresencesByUserId([testUserId,testUserId]);
return expect(presence.length).is.equals(2);
});

it("Set User Presence", async function () {
return expect(this.pnp.graph.users.getById(testUserId).presence.setPresence({
availability: "Busy",
Expand Down Expand Up @@ -59,13 +59,13 @@ describe("Cloud-Communications", function () {
return expect(this.pnp.graph.users.getById(testUserId).presence.setStatusMessage({
message:{
content: "Test Sample Message",
contentType: "text"
contentType: "text",
},
expiryDateTime:{
dateTime: date.toISOString(),
timeZone: 'Pacific Standard Time'
}
timeZone: "Pacific Standard Time",
},
})).eventually.be.fulfilled;
});

});

0 comments on commit 6f63e99

Please sign in to comment.