"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "js/read_receipts.js" between
Signal-Desktop-1.35.2.tar.gz and Signal-Desktop-1.36.1.tar.gz

About: Signal-Desktop is a cross-platform encrypted messaging service (also available for mobile devices).

read_receipts.js  (Signal-Desktop-1.35.2):read_receipts.js  (Signal-Desktop-1.36.1)
skipping to change at line 13 skipping to change at line 13
Backbone, Backbone,
_, _,
ConversationController, ConversationController,
MessageController, MessageController,
*/ */
/* eslint-disable more/no-then */ /* eslint-disable more/no-then */
// eslint-disable-next-line func-names // eslint-disable-next-line func-names
(function() { (function() {
'use strict';
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
Whisper.ReadReceipts = new (Backbone.Collection.extend({ Whisper.ReadReceipts = new (Backbone.Collection.extend({
forMessage(conversation, message) { forMessage(conversation, message) {
if (!message.isOutgoing()) { if (!message.isOutgoing()) {
return []; return [];
} }
let ids = []; let ids = [];
if (conversation.isPrivate()) { if (conversation.isPrivate()) {
ids = [conversation.id]; ids = [conversation.id];
} else { } else {
ids = conversation.get('members'); ids = conversation.getMemberIds();
} }
const receipts = this.filter( const receipts = this.filter(
receipt => receipt =>
receipt.get('timestamp') === message.get('sent_at') && receipt.get('timestamp') === message.get('sent_at') &&
_.contains(ids, receipt.get('reader')) _.contains(ids, receipt.get('reader'))
); );
if (receipts.length) { if (receipts.length) {
window.log.info('Found early read receipts for message'); window.log.info('Found early read receipts for message');
this.remove(receipts); this.remove(receipts);
} }
 End of changes. 2 change blocks. 
3 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)