Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve compliance with MSC3266 #4155

Merged
merged 15 commits into from
Apr 22, 2024
8 changes: 4 additions & 4 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,10 +865,10 @@ interface IThirdPartyUser {
fields: object;
}

interface IRoomSummary extends Omit<IPublicRoomsChunkRoom, "canonical_alias" | "aliases"> {
room_type?: RoomType;
export interface IRoomSummary extends Omit<IPublicRoomsChunkRoom, "canonical_alias" | "aliases"> {
membership?: Membership;
is_encrypted: boolean;
"im.nheko.summary.room_version"?: string;
"im.nheko.summary.encryption"?: boolean;
}

interface IRoomKeysResponse {
Expand Down Expand Up @@ -9787,7 +9787,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @param via - The list of servers which know about the room if only an ID was provided.
*/
public async getRoomSummary(roomIdOrAlias: string, via?: string[]): Promise<IRoomSummary> {
const path = utils.encodeUri("/rooms/$roomid/summary", { $roomid: roomIdOrAlias });
const path = utils.encodeUri("/summary/$roomid", { $roomid: roomIdOrAlias });
return this.http.authedRequest(Method.Get, path, { via }, undefined, {
prefix: "/_matrix/client/unstable/im.nheko.summary",
});
Expand Down
1 change: 1 addition & 0 deletions src/matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
export * from "./@types/IIdentityServerProvider";
export * from "./models/room-summary";
export * from "./models/event-status";
export { IRoomSummary } from "./client";

Check failure on line 80 in src/matrix.ts

View workflow job for this annotation

GitHub Actions / ESLint

All exports in the declaration are only used as types. Use `export type`
AndrewFerr marked this conversation as resolved.
Show resolved Hide resolved
export * as ContentHelpers from "./content-helpers";
export * as SecretStorage from "./secret-storage";
export type { ICryptoCallbacks } from "./crypto"; // used to be located here
Expand Down
Loading