mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 04:34:59 -04:00
Add ability to set topic by double-clicking on the topic text then hitting enter.
This commit is contained in:
parent
f64cc237fc
commit
6bdb23449a
5 changed files with 59 additions and 1 deletions
|
@ -235,6 +235,25 @@ angular.module('matrixService', [])
|
|||
|
||||
return doRequest("GET", path, undefined, {});
|
||||
},
|
||||
|
||||
setTopic: function(room_id, topic) {
|
||||
var data = {
|
||||
topic: topic
|
||||
};
|
||||
return this.sendStateEvent(room_id, "m.room.topic", data);
|
||||
},
|
||||
|
||||
|
||||
sendStateEvent: function(room_id, eventType, content, state_key) {
|
||||
var path = "/rooms/$room_id/state/"+eventType;
|
||||
if (state_key !== undefined) {
|
||||
path += "/" + state_key;
|
||||
}
|
||||
room_id = encodeURIComponent(room_id);
|
||||
path = path.replace("$room_id", room_id);
|
||||
|
||||
return doRequest("PUT", path, undefined, content);
|
||||
},
|
||||
|
||||
sendEvent: function(room_id, eventType, txn_id, content) {
|
||||
// The REST path spec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue