"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "js/delivery_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).

delivery_receipts.js  (Signal-Desktop-1.35.2):delivery_receipts.js  (Signal-Desktop-1.36.1)
skipping to change at line 13 skipping to change at line 13
Whisper, Whisper,
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.DeliveryReceipts = new (Backbone.Collection.extend({ Whisper.DeliveryReceipts = new (Backbone.Collection.extend({
forMessage(conversation, message) { forMessage(conversation, message) {
let recipients; let recipients;
if (conversation.isPrivate()) { if (conversation.isPrivate()) {
recipients = [conversation.id]; recipients = [conversation.id];
} else { } else {
recipients = conversation.get('members') || []; recipients = 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') &&
recipients.indexOf(receipt.get('deliveredTo')) > -1 recipients.indexOf(receipt.get('deliveredTo')) > -1
); );
this.remove(receipts); this.remove(receipts);
return receipts; return receipts;
}, },
async getTargetMessage(sourceId, messages) { async getTargetMessage(sourceId, messages) {
 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)