Emoji only mode WIP:

* Button to enable it on all rooms.
This commit is contained in:
John Livingston
2024-09-06 11:53:07 +02:00
parent 08017ac2bb
commit 91cddfa8d8
7 changed files with 116 additions and 2 deletions

View File

@ -312,4 +312,23 @@ export class ChannelDetailsService {
return response.json()
}
public async enableEmojisOnlyModeOnAllRooms (channelId: number): Promise<void> {
const response = await fetch(
getBaseRoute(this._registerClientOptions) +
'/api/configuration/channel/emojis/' +
encodeURIComponent(channelId) +
'/enable_emoji_only',
{
method: 'POST',
headers: this._headers
}
)
if (!response.ok) {
throw new Error('Can\'t enable Emojis Only Mode on all rooms.')
}
return response.json()
}
}