Commit graph

47 commits

Author SHA1 Message Date
Bruno Windels 4c17612b05 allow passing txn to loadMembers so we can do it as part of sync txn
to rewrite useridentities upon receiving new history visibility
2022-07-26 16:53:02 +02:00
Bruno Windels d79e5f7806 create key share operations for invitees when history visibility=invited 2022-07-20 15:20:23 +02:00
Bruno Windels 6d7c983e8e convert (Base)ObservableMap to typescript 2022-03-09 11:33:49 +01:00
Bruno Windels 8526461d3c split up create code into separate files 2022-02-10 16:43:32 +01:00
Bruno Windels 348de312f9 draft code in matrix layer to create room 2022-02-02 10:19:49 +01:00
RMidhunSuresh ea0adb4407 Convert RetainedValue.js to ts 2021-11-17 20:28:44 +05:30
Bruno Windels 82a0c1024c return static string when member is missing and add logging 2021-10-26 15:08:51 +02:00
Bruno Windels 826de7e9cb Write all members of a sync in one go
so state member events written but not causing a memberChange.hasJoined
don't prevent timeline member events for the same user from doing so
2021-08-27 17:11:29 +02:00
RMidhunSuresh 7e481080b5 Return null
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:06 +05:30
RMidhunSuresh e363d32921 Return null on error
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 23:42:55 +05:30
RMidhunSuresh bb68b4d367 Fetch member data from from state event if needed
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 23:01:44 +05:30
RMidhunSuresh 3aeb0c4d98 Indicate if no member found
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-21 18:34:55 +05:30
RMidhunSuresh 05f05bb577 Add method to get member from storage
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-19 19:36:09 +05:30
RMidhunSuresh 11eb9c7783 Use set instead of add in memberlist
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
Danila Fedorin b40f946b85 Add JSDoc to new Hero method 2021-06-30 15:15:08 -07:00
Danila Fedorin ee1f1500e9 Roll back to using heroes for computing DM color 2021-06-30 15:07:40 -07:00
Danila Fedorin d0f70cbdf9 Move avatar color ID computation into SummaryData 2021-06-29 18:01:08 -07:00
Danila Fedorin 97854423c4 Ensure DM rooms have the same color in timeline and left panel. 2021-06-28 11:44:27 -07:00
Bruno Windels 36f54420cf extract RetainedValue from MemberList 2021-05-07 13:06:00 +02:00
Bruno Windels 863f659774 fall back to bare userid for local echo profile 2021-04-08 16:30:46 +02:00
Bruno Windels f4a7782298 add MemberWriter, and only return MemberChange's if something changed 2021-03-05 17:03:45 +01:00
Bruno Windels 49fc971d67 cleanup 2021-03-05 17:02:57 +01:00
Bruno Windels e0d14207ac make opening a txn async again
as we'll need to await a bogus request first thing after opening the txn

funny enough, we originally made it sync to accommodate the same bug
in safari, but that didn't prevent any microtask being awaited
before scheduling a request in the calling code closing the txn.

We'll await a bogus request within the transaction class now so it
doesn't depend on the calling code
2021-03-04 19:47:02 +01:00
Bruno Windels dd38fc13d7 log sending messages 2021-02-23 19:22:59 +01:00
Bruno Windels 76381fbca1 open storage transactions synchronously
this (almost) makes it work in some browsers that otherwise
have throw a TransactionInactiveError on the first operation
you try to do on a store.
2020-09-28 16:06:41 +02:00
Bruno Windels a8392dc684 also decrypt messages in the sync response that enabled encryption
like initial sync
2020-09-23 14:26:14 +02:00
Bruno Windels 9f6822f362 remove needsRoomKey flag on member 2020-09-11 14:38:36 +02:00
Bruno Windels 212efe823c fix memberlist not containing all members
we were using the prev_batch of the last sync to pass to
/members, but this points at the timeline *before* the last
sync, so wouldn't contain all members. Use the sync token instead.
2020-09-09 09:50:03 +02:00
Bruno Windels bbaf3a5605 write needsRoomKey flag when new members joins to tracked e2ee room 2020-09-08 14:22:11 +02:00
Bruno Windels d184be2d22 rotate outbound megolm session when somebody leaves the room 2020-09-08 11:09:09 +02:00
Bruno Windels 703c89e276 make membership available on member 2020-08-31 16:07:29 +02:00
Bruno Windels 374dce638d these are assumed to be getters 2020-08-31 16:07:18 +02:00
Bruno Windels 4fd3e2ab20 response is a method 2020-08-31 16:07:04 +02:00
Bruno Windels 2e67b2b6b8 handle prev_content location ambiguity 2020-08-31 14:21:18 +02:00
Bruno Windels 8b358379e8 first draft of device tracker
mainly missing race protection with /sync and actually running the code
2020-08-31 14:12:12 +02:00
Bruno Windels 8482bc95ec pass memberchanges around instead of members
so we can easily tell how their membership changes, (e.g. join -> left)
which we'll need for device tracking.

Not adding this to RoomMember because RoomMember also needs to be
able to represent a member loaded from storage which doesn't contain
this error. A MemberChange exists only within a sync.
2020-08-31 09:50:57 +02:00
Bruno Windels 3e8e1bab67 remove logging 2020-08-27 10:38:22 +02:00
Bruno Windels 34ec96c1b8 look for displayname/avatar in prev content as well
as synapse doesn't set them on content for leave memberships

this caused these props to be removed in storage
2020-08-27 09:51:44 +02:00
Bruno Windels bd9cb5aae5 add RoomMember.name which falls back to userId
this will prevent the crash when left members
have their displayname removed (another issue)
2020-08-27 09:51:00 +02:00
Bruno Windels 70e89a3dd6 expose name/avatar on member 2020-08-21 18:13:53 +02:00
Bruno Windels ddfdbf9777 implement heroes logic to calculate the room name 2020-08-21 17:59:24 +02:00
Bruno Windels fafdf669db use prev_content from later events before state 2020-08-20 15:23:56 +02:00
Bruno Windels faaabd1837 fix changed member scenario (no need to fetch from storage) and errors 2020-08-19 16:51:16 +02:00
Bruno Windels 4144b0b281 move memberlist load code out of Room 2020-08-19 16:44:09 +02:00
Bruno Windels f7314990e4 add copyright header 2020-08-19 16:30:05 +02:00
Bruno Windels 463b9b745e base impl of member list 2020-08-19 16:29:54 +02:00
Bruno Windels d08297d1e0 move RoomMembers to own dir 2020-08-19 16:28:09 +02:00