Add getViaServers function

This commit is contained in:
Cadence Ember 2024-02-09 17:29:05 +13:00
parent 3fb2c983e0
commit 30afaa1e17
3 changed files with 146 additions and 2 deletions

View file

@ -115,7 +115,7 @@ function getStateEvent(roomID, type, key) {
/**
* "Any of the AS's users must be in the room. This API is primarily for Application Services and should be faster to respond than /members as it can be implemented more efficiently on the server."
* @param {string} roomID
* @returns {Promise<{joined: {[mxid: string]: {avatar_url?: string, display_name?: string}}}>}
* @returns {Promise<{joined: {[mxid: string]: {avatar_url: string?, display_name: string?}}}>}
*/
function getJoinedMembers(roomID) {
return mreq.mreq("GET", `/client/v3/rooms/${roomID}/joined_members`)