Commit 740656c
feat(audience-sdk)!: drop Identify/Alias string-identityType overloads
The Audience backend accepts only the closed IdentityType enum. The
string-identityType overloads on Identify and Alias were vestigial:
anything outside the enum gets rejected at validation, and studios
with a proprietary system already have IdentityType.Custom as the
escape hatch. Removes the overloads to match the TS SDK shape and
reduce footguns.
BREAKING CHANGE: callers of Identify(string, string, ...) or
Alias(string, string, string, string) must migrate to the IdentityType
overload. Direct mapping: "steam" -> IdentityType.Steam, "passport" ->
IdentityType.Passport, etc., per IdentityTypeExtensions.ToLowercaseString.
- ImmutableAudience.cs: consolidates each pair into the IdentityType
overload, calling .ToLowercaseString() inline at the MessageBuilder
call site. Drops the two string overloads and their wrappers.
- ImmutableAudienceTests.cs: migrates four test calls from string to
enum form (Identify and Alias).
dotnet test: 274 passed, 0 failed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 62c2273 commit 740656c
3 files changed
Lines changed: 28 additions & 41 deletions
File tree
- examples/audience/Assets/SampleApp/Scripts
- src/Packages/Audience
- Runtime
- Tests/Runtime
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
374 | 389 | | |
375 | 390 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
| 311 | + | |
325 | 312 | | |
326 | 313 | | |
327 | 314 | | |
| |||
352 | 339 | | |
353 | 340 | | |
354 | 341 | | |
355 | | - | |
356 | | - | |
| 342 | + | |
| 343 | + | |
357 | 344 | | |
358 | 345 | | |
359 | 346 | | |
| |||
364 | 351 | | |
365 | 352 | | |
366 | 353 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
| 354 | + | |
384 | 355 | | |
385 | 356 | | |
386 | 357 | | |
| |||
399 | 370 | | |
400 | 371 | | |
401 | 372 | | |
402 | | - | |
| 373 | + | |
| 374 | + | |
403 | 375 | | |
404 | 376 | | |
405 | 377 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
| 621 | + | |
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
| 636 | + | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | | - | |
| 651 | + | |
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
| 974 | + | |
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
| |||
0 commit comments