From 2b7cbef8b1179e3684ad40280cff709190ce934e Mon Sep 17 00:00:00 2001 From: lilia Date: Thu, 25 Feb 2016 17:10:22 -0800 Subject: [PATCH] Rename a function Avoid confusing this operation with actual receipts, which are something else. // FREEBIE --- js/libtextsecure.js | 10 +++++----- js/models/conversations.js | 2 +- libtextsecure/sendmessage.js | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 4abce444..75250505 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -37686,16 +37686,16 @@ MessageSender.prototype = { return this.sendIndividualProto(myNumber, contentMessage, Date.now()); } }, - sendReadReceipts: function(receipts) { + syncReadMessages: function(reads) { var myNumber = textsecure.storage.user.getNumber(); var myDevice = textsecure.storage.user.getDeviceId(); if (myDevice != 1) { var syncMessage = new textsecure.protobuf.SyncMessage(); syncMessage.read = []; - for (var i = 0; i < receipts.length; ++i) { + for (var i = 0; i < reads.length; ++i) { var read = new textsecure.protobuf.SyncMessage.Read(); - read.timestamp = receipts[i].timestamp; - read.sender = receipts[i].sender; + read.timestamp = reads[i].timestamp; + read.sender = reads[i].sender; syncMessage.read.push(read); } var contentMessage = new textsecure.protobuf.Content(); @@ -37905,7 +37905,7 @@ textsecure.MessageSender = function(url, username, password, attachment_server_u this.setGroupAvatar = sender.setGroupAvatar .bind(sender); this.leaveGroup = sender.leaveGroup .bind(sender); this.sendSyncMessage = sender.sendSyncMessage .bind(sender); - this.sendReadReceipts = sender.sendReadReceipts .bind(sender); + this.syncReadMessages = sender.syncReadMessages .bind(sender); }; textsecure.MessageSender.prototype = { diff --git a/js/models/conversations.js b/js/models/conversations.js index d432bdfb..028bfe4b 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -219,7 +219,7 @@ }; }); if (read.length > 0) { - textsecure.messaging.sendReadReceipts(read); + textsecure.messaging.syncReadMessages(read); } }); } diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index 35b7a70a..f05eb258 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -229,16 +229,16 @@ MessageSender.prototype = { return this.sendIndividualProto(myNumber, contentMessage, Date.now()); } }, - sendReadReceipts: function(receipts) { + syncReadMessages: function(reads) { var myNumber = textsecure.storage.user.getNumber(); var myDevice = textsecure.storage.user.getDeviceId(); if (myDevice != 1) { var syncMessage = new textsecure.protobuf.SyncMessage(); syncMessage.read = []; - for (var i = 0; i < receipts.length; ++i) { + for (var i = 0; i < reads.length; ++i) { var read = new textsecure.protobuf.SyncMessage.Read(); - read.timestamp = receipts[i].timestamp; - read.sender = receipts[i].sender; + read.timestamp = reads[i].timestamp; + read.sender = reads[i].sender; syncMessage.read.push(read); } var contentMessage = new textsecure.protobuf.Content(); @@ -448,7 +448,7 @@ textsecure.MessageSender = function(url, username, password, attachment_server_u this.setGroupAvatar = sender.setGroupAvatar .bind(sender); this.leaveGroup = sender.leaveGroup .bind(sender); this.sendSyncMessage = sender.sendSyncMessage .bind(sender); - this.sendReadReceipts = sender.sendReadReceipts .bind(sender); + this.syncReadMessages = sender.syncReadMessages .bind(sender); }; textsecure.MessageSender.prototype = {