Message.idForLogging: Ensure that it works for outgoing
This commit is contained in:
parent
f04812eb5d
commit
b290a27173
1 changed files with 12 additions and 3 deletions
|
@ -967,9 +967,11 @@
|
|||
|
||||
// General
|
||||
idForLogging() {
|
||||
return `${this.get('source')}.${this.get('sourceDevice')} ${this.get(
|
||||
'sent_at'
|
||||
)}`;
|
||||
const source = this.getSource();
|
||||
const device = this.getSourceDevice();
|
||||
const timestamp = this.get('sent_at');
|
||||
|
||||
return `${source}.${device} ${timestamp}`;
|
||||
},
|
||||
defaults() {
|
||||
return {
|
||||
|
@ -1161,6 +1163,13 @@
|
|||
|
||||
return this.OUR_NUMBER;
|
||||
},
|
||||
getSourceDevice() {
|
||||
if (this.isIncoming()) {
|
||||
return this.get('sourceDevice');
|
||||
}
|
||||
|
||||
return window.textsecure.storage.user.getDeviceId();
|
||||
},
|
||||
getSourceUuid() {
|
||||
if (this.isIncoming()) {
|
||||
return this.get('sourceUuid');
|
||||
|
|
Loading…
Reference in a new issue