Closed Bug 874912 Opened 11 years ago Closed 11 years ago

WebSMS: SmsMessage interface should expose a receivers property

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: gnarf, Unassigned)

References

Details

Currently MmsMessage exposes "receivers" which is an array of numbers, and SmsMessage does not. Though it makes sense to only ever have one "receiver" as is exposed by SmsMessage, the two message types should try to be as similar as possible. Doing something as simple as SmsMessage.receivers === [SmsMessage.receiver]; Would allow developers of applications to always just look at receivers and expect an array for all message types. I think this would be useful.
Vicamo, your thoughts on this ? :)
Flags: needinfo?(vyang)
A few other needinfo? - Your thoughts please?
Flags: needinfo?(gene.lian)
Flags: needinfo?(ctai)
I afraid I don't think the same. That's a DOM interface for SMS messages and technically SMS messages have only one receiver. Having a field calls |receivers| sounds like we're telling developers otherwise.
Flags: needinfo?(vyang)
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
Summary: SmsMessage interface should expose a receivers property → WebSMS: SmsMessage interface should expose a receivers property
Vicamo, I think we should try to reach to a same set of properties for MMS and SMS. We could have an additional "receiver" property specific to Sms, but I think it definitely makes sense to have one "receivers" property that would be common to both SMS, MMS, and whatever other message types we may have in the future. Without this, we're obliged to do if/else clauses in Gaia, and it feels like spaghetti code that could be avoided. As a matter of fact, we even made a mistake because of this. This is not a blocker and we can do without this, but I definitely think we should consider doing this.
I disagree. If we use an array type for that attribute, it could be very confusing because it means the concept of multiple receivers is allowed for an SMS. However, it's not a feature for an SMS by nature. Needless to say receiver"s" doesn't look as it is since it always contains a single receiver only. Btw, the W3C proposal attempts to use a string for SMS's receiver [1] and use a string array for MMS's receivers [2]. It'd be better to follow the same concept. [1] http://messaging.sysapps.org/#idl-def-SmsMessage [2] http://messaging.sysapps.org/#idl-def-MmsMessage
Flags: needinfo?(gene.lian)
ok so I guess we should close this as WONTFIX.
(In reply to Gene Lian [:gene] from comment #5) > Btw, the W3C proposal attempts to use a string for SMS's receiver [1] and > use a string array for MMS's receivers [2]. It'd be better to follow the > same concept. Following what the specification being worked on in SysApps is doing is probably the best way to go.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Flags: needinfo?(ctai)
You need to log in before you can comment on or make changes to this bug.