You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement logic to send current timezone when updated on specific chat and receive/store timezone on each chat.
Base branch: develop: All new changes needs to be done using develop branch as base branch. We use develop as base for Test Flight distribution releases
Context
When sending a message we use the Sphinx.send method. This method contains a msgJson param that will contain a json string with all message content including text, mediaKey (if attachment), amount (if boost), etc. This msgJson param now contains a new key metadata that can store and send any json string. We will use this metadata json to send timezone. When a message is received the msgJson sent by the msg sender is decoded using the Mappable class MessageInnerContent inside the init method of GenericIncomingMessage.
Requirements
MODELS
Add metadata field in MessageInnerContent struct
NEW TIMEZONE FORM
Implement logic to show value of timezoneEnabled for specific chat in new view toggle control
Implement logic to show value of timezoneIdentifier for specific chat in new view field (show Use Computer Settings if NULL)
Implement logic to store new values on chat when modified on new view form:
Save timezoneEnabled if toggle changed (TRUE/FALSE)
Save timezoneIdentifier from picker value if changed (Set to NULL if first option "Use Computer Settings" is selected from picker)
Update timezoneUpdated to TRUE when timezoneIdentifier value changes
SENDING TIMEZONE
Send json string with timezone inside metadata attribute (msg["metadata"] = "{\"timezone\": \"America/Los_Angeles\"}") on message (inside func formatMsg()) if timezoneEnabled == true and timezoneUpdated == true on the chat you are sending the message.
Set timezoneUpdated = false after message with timezoneIdentifier is sent (this will prevent timezone to be sent on every message if it doesn't changed)
RECEIVING TIMEZONE
Add timezone attribute in GenericIncomingMessage and save it inside innerContent.metaData if not empty.
Save remoteTimezoneIdentifier (coming as timezone inside metadata json) on chat when message is received in a contact conversation (chat.remoteTimezoneIdentifier) and on message when received in a tribe (message.remoteTimezoneIdentifier)
Acceptance Criteria
Implement logic to set timezone sharing for each contact/tribe, send it on message and receive store timezone information coming from others on incoming messages
The text was updated successfully, but these errors were encountered:
Implement logic to send current timezone when updated on specific chat and receive/store timezone on each chat.
Base branch: develop: All new changes needs to be done using
develop
branch as base branch. We usedevelop
as base for Test Flight distribution releasesContext
When sending a message we use the
Sphinx.send
method. This method contains amsgJson
param that will contain a json string with all message content including text, mediaKey (if attachment), amount (if boost), etc. ThismsgJson
param now contains a new keymetadata
that can store and send any json string. We will use thismetadata
json to send timezone. When a message is received themsgJson
sent by the msg sender is decoded using the Mappable classMessageInnerContent
inside theinit
method ofGenericIncomingMessage
.Requirements
MODELS
metadata
field inMessageInnerContent
structNEW TIMEZONE FORM
timezoneEnabled
for specific chat in new view toggle controltimezoneIdentifier
for specific chat in new view field (showUse Computer Settings
if NULL)timezoneEnabled
if toggle changed (TRUE/FALSE)timezoneIdentifier
from picker value if changed (Set toNULL
if first option "Use Computer Settings" is selected from picker)timezoneUpdated
toTRUE
whentimezoneIdentifier
value changesSENDING TIMEZONE
metadata
attribute (msg["metadata"] = "{\"timezone\": \"America/Los_Angeles\"}"
) on message (insidefunc formatMsg()
) iftimezoneEnabled == true
andtimezoneUpdated == true
on the chat you are sending the message.timezoneUpdated = false
after message withtimezoneIdentifier
is sent (this will prevent timezone to be sent on every message if it doesn't changed)RECEIVING TIMEZONE
timezone
attribute inGenericIncomingMessage
and save it insideinnerContent.metaData
if not empty.remoteTimezoneIdentifier
(coming as timezone inside metadata json) on chat when message is received in a contact conversation (chat.remoteTimezoneIdentifier
) and on message when received in a tribe (message.remoteTimezoneIdentifier
)Acceptance Criteria
The text was updated successfully, but these errors were encountered: