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
|
// General
|
||||||
idForLogging() {
|
idForLogging() {
|
||||||
return `${this.get('source')}.${this.get('sourceDevice')} ${this.get(
|
const source = this.getSource();
|
||||||
'sent_at'
|
const device = this.getSourceDevice();
|
||||||
)}`;
|
const timestamp = this.get('sent_at');
|
||||||
|
|
||||||
|
return `${source}.${device} ${timestamp}`;
|
||||||
},
|
},
|
||||||
defaults() {
|
defaults() {
|
||||||
return {
|
return {
|
||||||
|
@ -1161,6 +1163,13 @@
|
||||||
|
|
||||||
return this.OUR_NUMBER;
|
return this.OUR_NUMBER;
|
||||||
},
|
},
|
||||||
|
getSourceDevice() {
|
||||||
|
if (this.isIncoming()) {
|
||||||
|
return this.get('sourceDevice');
|
||||||
|
}
|
||||||
|
|
||||||
|
return window.textsecure.storage.user.getDeviceId();
|
||||||
|
},
|
||||||
getSourceUuid() {
|
getSourceUuid() {
|
||||||
if (this.isIncoming()) {
|
if (this.isIncoming()) {
|
||||||
return this.get('sourceUuid');
|
return this.get('sourceUuid');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue