/// <summary> /// Attempt to set the name of the room. /// This may fail if you do not have the required permissions. /// </summary> /// <param name="newName">New name.</param> public void SetName(string newName) { MatrixMRoomName nameEvent = new MatrixMRoomName(); nameEvent.name = newName; api.RoomStateSend(ID, "m.room.name", nameEvent); }
public void FeedEventNameTest() { MatrixRoom room = new MatrixRoom(null, "!abc:localhost"); var ev = new MatrixMRoomName() { name = "Snug Fox Party!" }; room.FeedEvent(Utils.MockEvent(ev)); Assert.That(room.Name, Is.EqualTo("Snug Fox Party!"), "Name is correct."); }