/// <summary> /// Attempt to set the topic of the room. /// This may fail if you do not have the required permissions. /// </summary> /// <param name="newTopic">New topic.</param> public void SetTopic(string newTopic) { MatrixMRoomTopic topicEvent = new MatrixMRoomTopic(); topicEvent.topic = newTopic; api.RoomStateSend(ID, "m.room.topic", topicEvent); }
public void FeedEventTopicTest() { MatrixRoom room = new MatrixRoom(null, "!abc:localhost"); var ev = new MatrixMRoomTopic() { topic = "Foxes welcome!" }; room.FeedEvent(Utils.MockEvent(ev)); Assert.That(room.Topic, Is.EqualTo("Foxes welcome!"), "Topic is correct."); }