Skip to content
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

Add Timezone sharing #810

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

Add Timezone sharing #810

wants to merge 6 commits into from

Conversation

Airyzz
Copy link

@Airyzz Airyzz commented Sep 4, 2022

Description

Adds the ability for a user to append their local time zone to the room state.

In direct messages, Cinny will display the local time of the user you are talking to in a banner, if they have shared their timezone
( #620 )

This is implemented by sending an event in.cinny.share_timezone to a room, and then appending the id of that event to the room state under in.cinny.shared_timezone where the sender's name is the state key.

share_timezone event:

{
  "user_timezone": "Asia/Jakarta"
  "msgtype": "in.cinny.share_timezone"
}

shared_timezone room state event:

{
  "user_timezone_event": <event_id>
}

It is implemented in this way, so that the timezone information can be shared with an (encrypted, if room is encrypted) event, and since the event id is in the room state, it can be easily found.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Preview: https://810--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

@Airyzz Airyzz marked this pull request as draft September 13, 2022 06:36
@Airyzz
Copy link
Author

Airyzz commented Sep 13, 2022

Converted this to a draft, I want to change this so timezones are shared with e2ee

@Airyzz Airyzz marked this pull request as ready for review September 18, 2022 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants