mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-03-02 01:39:21 +00:00
react-skype-status: fixed a bug where subscription to the current users status wouldn't work (#554)
This commit is contained in:
parent
711cae3666
commit
293bbba17a
@ -27,6 +27,7 @@ react-skype-status|[Vincent Biret](https://github.com/baywet)
|
|||||||
|
|
||||||
Version|Date|Comments
|
Version|Date|Comments
|
||||||
-------|----|--------
|
-------|----|--------
|
||||||
|
1.2|July 4th, 2018|Fixed a bug when subscribing to the current user's status
|
||||||
1.1|June 25th, 2018|Upgrade to 1.5
|
1.1|June 25th, 2018|Upgrade to 1.5
|
||||||
1.0|December 1, 2017|Initial release
|
1.0|December 1, 2017|Initial release
|
||||||
|
|
||||||
@ -50,7 +51,7 @@ Take note of the `application ID`, we'll need it later. Click on `required permi
|
|||||||

|

|
||||||
Click on `add` then `select an API` and select `Skype for Business`.
|
Click on `add` then `select an API` and select `Skype for Business`.
|
||||||

|

|
||||||
Select under `delegated permissions` both `Read/Write Skype user contacts and groups` and `Read/Write Skype user information (preview)`, then click `select`. Finish by clicking `Done`.
|
Select under `delegated permissions` both `Read/Write Skype user contacts and groups`, `Read/Write Skype user information (preview)`, `Receive conversation invites (preview)` (the receive conversation permission is required to get access to the mePerson object and have access to the current user's presence information) then click `select`. Finish by clicking `Done`.
|
||||||

|

|
||||||
Don't forget to click on `Grant permissions` and `yes`.
|
Don't forget to click on `Grant permissions` and `yes`.
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 10 KiB |
@ -22,8 +22,11 @@ export class SkypeForBusinessCommunicationService implements ICommunicationServi
|
|||||||
const personsAndGroupsManager: any = skypeApp.personsAndGroupsManager;
|
const personsAndGroupsManager: any = skypeApp.personsAndGroupsManager;
|
||||||
const mePerson: any = personsAndGroupsManager.mePerson;
|
const mePerson: any = personsAndGroupsManager.mePerson;
|
||||||
if (SkypeForBusinessCommunicationService.webPartContext().pageContext.user.email === userEmail) {
|
if (SkypeForBusinessCommunicationService.webPartContext().pageContext.user.email === userEmail) {
|
||||||
Log.info(Constants.ErrorCategory, `Bypassed skype subscription for current user ${userEmail}`);
|
mePerson.status.changed((newStatus: string, reason: string, oldStatus: string) => {
|
||||||
handler("Online", undefined, mePerson.displayName());
|
Log.info(Constants.ErrorCategory, `${mePerson.displayName()} status changed from ${oldStatus} to ${newStatus} because ${reason}`);
|
||||||
|
handler(newStatus, oldStatus, mePerson.displayName());
|
||||||
|
});
|
||||||
|
mePerson.status.subscribe();
|
||||||
} else {
|
} else {
|
||||||
const query: any = personsAndGroupsManager.createPersonSearchQuery();
|
const query: any = personsAndGroupsManager.createPersonSearchQuery();
|
||||||
query.text(userEmail);
|
query.text(userEmail);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user