Handle setting a newTag without metaData
metaData is actually the request body for the PUT that adds the tag so we need to send {} for e.g. m.lowpriority, which is not manually ordered.
This commit is contained in:
parent
feca1707f1
commit
b744dbaab7
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ RoomListActions.tagRoom = function(matrixClient, room, oldTag, newTag, oldIndex,
|
||||||
(hasChangedSubLists || metaData)
|
(hasChangedSubLists || metaData)
|
||||||
) {
|
) {
|
||||||
// Optimistic update of what will happen to the room tags
|
// Optimistic update of what will happen to the room tags
|
||||||
room.tags[newTag] = metaData;
|
room.tags[newTag] = metaData || {};
|
||||||
|
|
||||||
const promiseToAdd = matrixClient.setRoomTag(roomId, newTag, metaData).catch(function(err) {
|
const promiseToAdd = matrixClient.setRoomTag(roomId, newTag, metaData).catch(function(err) {
|
||||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue