mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 16:54:56 -04:00
Change call signalling messages to be their own types of room events rather than room messages with different msgtypes: room messages should be things that the client can display as a unit message to the user.
This commit is contained in:
parent
171d8b032f
commit
5308e3026a
5 changed files with 27 additions and 18 deletions
|
@ -172,9 +172,9 @@ angular.module('matrixService', [])
|
|||
return doRequest("GET", path, undefined, {});
|
||||
},
|
||||
|
||||
sendMessage: function(room_id, txn_id, content) {
|
||||
sendEvent: function(room_id, eventType, txn_id, content) {
|
||||
// The REST path spec
|
||||
var path = "/rooms/$room_id/send/m.room.message/$txn_id";
|
||||
var path = "/rooms/$room_id/send/"+eventType+"/$txn_id";
|
||||
|
||||
if (!txn_id) {
|
||||
txn_id = "m" + new Date().getTime();
|
||||
|
@ -190,6 +190,10 @@ angular.module('matrixService', [])
|
|||
return doRequest("PUT", path, undefined, content);
|
||||
},
|
||||
|
||||
sendMessage: function(room_id, txn_id, content) {
|
||||
return self.sendObject(room_id, 'm.room.message', txn_id, content);
|
||||
},
|
||||
|
||||
// Send a text message
|
||||
sendTextMessage: function(room_id, body, msg_id) {
|
||||
var content = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue