skip delivery reports in pending messages (#651227)
We already ignore them in _messageReceived but have to ignore them as well when displaying pending messages.
This commit is contained in:
parent
7ef35fbec7
commit
7b65735cc9
@ -240,7 +240,16 @@ Source.prototype = {
|
|||||||
let logMessages = events.map(makeMessageFromTplEvent);
|
let logMessages = events.map(makeMessageFromTplEvent);
|
||||||
|
|
||||||
let pendingTpMessages = this._channel.get_pending_messages();
|
let pendingTpMessages = this._channel.get_pending_messages();
|
||||||
let pendingMessages = pendingTpMessages.map(function (tpMessage) { return makeMessageFromTpMessage(tpMessage, NotificationDirection.RECEIVED); });
|
let pendingMessages = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < pendingTpMessages.length; i++) {
|
||||||
|
let message = pendingTpMessages[i];
|
||||||
|
|
||||||
|
if (message.get_message_type() == Tp.ChannelTextMessageType.DELIVERY_REPORT)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
pendingMessages.push(makeMessageFromTpMessage(message, NotificationDirection.RECEIVED));
|
||||||
|
}
|
||||||
|
|
||||||
let showTimestamp = false;
|
let showTimestamp = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user