You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2026-01-03 23:22:30 +03:00
NOP typing/receipts when a guest
This commit is contained in:
@@ -1269,6 +1269,10 @@ MatrixClient.prototype.sendHtmlEmote = function(roomId, body, htmlBody, callback
|
||||
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||
*/
|
||||
MatrixClient.prototype.sendReceipt = function(event, receiptType, callback) {
|
||||
if (this.isGuest()) {
|
||||
return q({}); // guests cannot send receipts so don't bother.
|
||||
}
|
||||
|
||||
var path = utils.encodeUri("/rooms/$roomId/receipt/$receiptType/$eventId", {
|
||||
$roomId: event.getRoomId(),
|
||||
$receiptType: receiptType,
|
||||
@@ -1332,6 +1336,10 @@ MatrixClient.prototype.getCurrentUploads = function() {
|
||||
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||
*/
|
||||
MatrixClient.prototype.sendTyping = function(roomId, isTyping, timeoutMs, callback) {
|
||||
if (this.isGuest()) {
|
||||
return q({}); // guests cannot send typing notifications so don't bother.
|
||||
}
|
||||
|
||||
var path = utils.encodeUri("/rooms/$roomId/typing/$userId", {
|
||||
$roomId: roomId,
|
||||
$userId: this.credentials.userId
|
||||
|
||||
Reference in New Issue
Block a user