mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 1007542 - Add Phone Number into FROM Field of MMS Header when transmitting MMS PDU to network. r=vyang
This commit is contained in:
parent
4b189402f3
commit
61afb80410
@ -1120,8 +1120,11 @@ function SendTransaction(mmsConnection, cancellableId, msg, requestDeliveryRepor
|
||||
}
|
||||
msg.headers["x-mms-mms-version"] = MMS.MMS_VERSION;
|
||||
|
||||
// Let MMS Proxy Relay insert from address automatically for us
|
||||
msg.headers["from"] = null;
|
||||
// Insert Phone number if available.
|
||||
// Otherwise, Let MMS Proxy Relay insert from address automatically for us.
|
||||
let phoneNumber = mmsConnection.getPhoneNumber();
|
||||
msg.headers["from"] = (phoneNumber) ?
|
||||
{ address: phoneNumber, type: "PLMN" } : null;
|
||||
|
||||
msg.headers["date"] = new Date();
|
||||
msg.headers["x-mms-message-class"] = "personal";
|
||||
@ -1416,7 +1419,11 @@ function ReadRecTransaction(mmsConnection, messageID, toAddress) {
|
||||
let to = {address: toAddress,
|
||||
type: type}
|
||||
headers["to"] = to;
|
||||
headers["from"] = null;
|
||||
// Insert Phone number if available.
|
||||
// Otherwise, Let MMS Proxy Relay insert from address automatically for us.
|
||||
let phoneNumber = mmsConnection.getPhoneNumber();
|
||||
headers["from"] = (phoneNumber) ?
|
||||
{ address: phoneNumber, type: "PLMN" } : null;
|
||||
headers["x-mms-read-status"] = MMS.MMS_PDU_READ_STATUS_READ;
|
||||
|
||||
this.istream = MMS.PduHelper.compose(null, {headers: headers});
|
||||
|
Loading…
Reference in New Issue
Block a user