From 46230e59add55f2d16f151496ecec4e78060d731 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Thu, 26 May 2022 11:59:50 +0530 Subject: [PATCH] Add setProfileAvatarURl and displayName --- src/matrix/net/HomeServerApi.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/matrix/net/HomeServerApi.ts b/src/matrix/net/HomeServerApi.ts index 30406c34..7f0f17ca 100644 --- a/src/matrix/net/HomeServerApi.ts +++ b/src/matrix/net/HomeServerApi.ts @@ -302,6 +302,14 @@ export class HomeServerApi { return this._get(`/profile/${encodeURIComponent(userId)}`); } + setProfileDisplayName(userId, displayName, options?: BaseRequestOptions): IHomeServerRequest { + return this._put(`/profile/${encodeURIComponent(userId)}/displayname`, {}, { displayname: displayName }, options); + } + + setProfileAvatarUrl(userId, avatarUrl, options?: BaseRequestOptions): IHomeServerRequest { + return this._put(`/profile/${encodeURIComponent(userId)}/avatar_url`, {}, { avatar_url: avatarUrl }, options); + } + createRoom(payload: Record, options?: BaseRequestOptions): IHomeServerRequest { return this._post(`/createRoom`, {}, payload, options); }