You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Add method to fetch /account/whoami (#2046)
This commit is contained in:
committed by
GitHub
parent
87b920698f
commit
b716cde9b5
@@ -8892,6 +8892,13 @@ export class MatrixClient extends EventEmitter {
|
|||||||
room.addThreadedEvent(event);
|
room.addThreadedEvent(event);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetches the user_id of the configured access token.
|
||||||
|
*/
|
||||||
|
public async whoami(): Promise<{ user_id: string }> { // eslint-disable-line camelcase
|
||||||
|
return this.http.authedRequest(undefined, "GET", "/account/whoami");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user