зеркало из https://github.com/mozilla/gecko-dev.git
Bug 808220 - [SMS API] Retrieve a 'sent' message show field 'sender' as 'undefined' STRING, not undefined [r=ferjm]
This commit is contained in:
Родитель
dfc19006a9
Коммит
e8ad7b748f
|
@ -451,6 +451,12 @@ SmsDatabaseService.prototype = {
|
|||
saveReceivedMessage: function saveReceivedMessage(sender, body, messageClass, date) {
|
||||
let receiver = this.mRIL.rilContext.icc ? this.mRIL.rilContext.icc.msisdn : null;
|
||||
|
||||
// Workaround an xpconnect issue with undefined string objects.
|
||||
// See bug 808220
|
||||
if (receiver === undefined || receiver === "undefined") {
|
||||
receiver = null;
|
||||
}
|
||||
|
||||
let message = {delivery: DELIVERY_RECEIVED,
|
||||
deliveryStatus: DELIVERY_STATUS_SUCCESS,
|
||||
sender: sender,
|
||||
|
@ -465,6 +471,12 @@ SmsDatabaseService.prototype = {
|
|||
saveSentMessage: function saveSentMessage(receiver, body, date) {
|
||||
let sender = this.mRIL.rilContext.icc ? this.mRIL.rilContext.icc.msisdn : null;
|
||||
|
||||
// Workaround an xpconnect issue with undefined string objects.
|
||||
// See bug 808220
|
||||
if (sender === undefined || sender === "undefined") {
|
||||
sender = null;
|
||||
}
|
||||
|
||||
let message = {delivery: DELIVERY_SENT,
|
||||
deliveryStatus: DELIVERY_STATUS_PENDING,
|
||||
sender: sender,
|
||||
|
|
Загрузка…
Ссылка в новой задаче