-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix timezone_id not being set #1842
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, noting we don't save the timezone_id to the properties model locally until the next session via hydration from a fetch user.
@@ -99,6 +93,8 @@ internal class LoginUserOperationExecutor( | |||
private suspend fun createUser(createUserOperation: LoginUserOperation, operations: List<Operation>): ExecutionResponse { | |||
var identities = mapOf<String, String>() | |||
var subscriptions = mapOf<String, SubscriptionObject>() | |||
val properties = mutableMapOf<String, String>() | |||
properties["timezone_id"] = TimeUtils.getTimeZoneId()!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to remove !!
and change TimeUtils.getTimeZoneId()
to return a non-optional String. That method seems like it should always return a String.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed! Ya that method always returns a string so I changed its return type to be non-optional
Fix timezone_id not being set
Fix timezone_id not being set
Fix timezone_id not being set
Description
One Line Summary
This fixes an issue where timezone_id was not being set as a property on users.
Details
This issue resulted in scheduled notifications being received at the wrong time.
In order to send the
timezone_id
we are adding a properties map in thecreateUser
call. The properties set there (onlytimezone_id
) will be hydrated to the properties model when the response is received.fixes #1829
Motivation
Fix scheduled notifications
Scope
user properties during createUser
Testing
Unit testing
Added properties object to existing unit tests
Manual testing
Tested scheduled notifications on a physical device.
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is