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

Live location sharing - Aggregate beacon locations on beacons #2268

Merged
merged 11 commits into from
Apr 8, 2022

Conversation

kerryarchibald
Copy link
Contributor

@kerryarchibald kerryarchibald commented Apr 1, 2022

Process m.beacon events, adding them to Beacon state and emitting on change.


Here's what your changelog entry will look like:

✨ Features

  • Live location sharing - Aggregate beacon locations on beacons (#2268). Contributed by @kerryarchibald.

Kerry Archibald added 5 commits April 4, 2022 11:05
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
@codecov-commenter
Copy link

codecov-commenter commented Apr 4, 2022

Codecov Report

Merging #2268 (66f5796) into develop (71b7521) will increase coverage by 0.11%.
The diff coverage is 97.91%.

@@             Coverage Diff             @@
##           develop    #2268      +/-   ##
===========================================
+ Coverage    59.00%   59.11%   +0.11%     
===========================================
  Files           91       91              
  Lines        16335    16383      +48     
  Branches      3768     3779      +11     
===========================================
+ Hits          9638     9685      +47     
- Misses        6697     6698       +1     
Impacted Files Coverage Δ
src/client.ts 38.34% <88.88%> (+0.19%) ⬆️
src/content-helpers.ts 80.00% <100.00%> (+1.73%) ⬆️
src/models/beacon.ts 100.00% <100.00%> (ø)
src/models/room-state.ts 77.28% <100.00%> (+1.05%) ⬆️
src/sync.ts 65.63% <100.00%> (+0.05%) ⬆️
src/utils.ts 88.23% <100.00%> (+0.23%) ⬆️

Kerry Archibald added 2 commits April 4, 2022 12:23
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
@kerryarchibald kerryarchibald marked this pull request as ready for review April 4, 2022 10:32
@kerryarchibald kerryarchibald requested a review from a team as a code owner April 4, 2022 10:32
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm - thanks!

const beaconEvent2 = makeBeaconEvent(userId, { timestamp: 1648804528558 });
const beaconEvent3 = makeBeaconEvent(userId, { timestamp: 1648804528000 });
const beaconEvent4 = makeBeaconEvent(userId, { timestamp: 0 });
it('sorts events with timestamps as later than events without', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('sorts events with timestamps as later than events without', () => {
it('sorts events with timestamps as later than events without', () => {

function getContentTimestampWithFallback(event: MatrixEvent): number {
return M_TIMESTAMP.findIn<number>(event.getContent()) ?? -1;
}
/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
/**

Kerry Archibald added 4 commits April 8, 2022 11:22
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
@kerryarchibald kerryarchibald enabled auto-merge (squash) April 8, 2022 11:24
@kerryarchibald kerryarchibald merged commit f963fea into develop Apr 8, 2022
@kerryarchibald kerryarchibald deleted the psf-866/beacon-relations branch April 8, 2022 11:26
su-ex added a commit to SchildiChat/matrix-js-sdk that referenced this pull request Apr 30, 2022
* Add MatrixClient.doesServerSupportLogoutDevices() for MSC2457 ([\matrix-org#2297](matrix-org#2297)).
* Live location sharing - expose room liveBeaconIds ([\matrix-org#2296](matrix-org#2296)).
* Support for MSC2457 logout_devices param for setPassword() ([\matrix-org#2285](matrix-org#2285)).
* Stabilise token authenticated registration support ([\matrix-org#2181](matrix-org#2181)). Contributed by @govynnus.
* Live location sharing - Aggregate beacon locations on beacons ([\matrix-org#2268](matrix-org#2268)).
* Prevent duplicated re-emitter setups in event-mapper ([\matrix-org#2293](matrix-org#2293)).
* Make self membership less prone to races ([\matrix-org#2277](matrix-org#2277)). Fixes element-hq/element-web#21661.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants