DataSync events now carry the subscriber's language
Every DataSync event now carries language in the common envelope: the language the subscriber
receives content in (en, ar, ku, ku2), alongside msisdn and serviceId.
Why
The first thing you do after subscription.created is send content, and the one thing you need to
do that correctly is which language to send it in. Until now the only way to learn it was a
subscription.language_changed event, which a subscriber who never
switches language never generates. So the message that mattered most was the one you had the least
information for.
null means "we do not know", never "English"
The field is null when we hold no language for that MSISDN: an event about a number with no
subscriber profile yet, or one whose language we have not learned. Please do not read null as a
default of en. Fall back to your own service's default, and expect the real value on later
events once it is known.
Nothing breaks
This is an additive field. Existing integrations that ignore unknown keys are unaffected, and the signature is computed over the whole body as before. If you verify signatures, you are already hashing the bytes you received rather than a field list, so nothing changes there either.
On subscription.language_changed the envelope value is the language switched to, matching that
event's own language field; previousLanguage still carries the one they left.