Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bbfefbf
Removes user entity change during room nickname change
ericdecanini Mar 23, 2022
4c1e651
Adds changelog file
ericdecanini Mar 23, 2022
927eeb3
Refactors RoomMemberEventHandler with change to only save the user lo…
ericdecanini Mar 30, 2022
0200f48
Fixes lint error
ericdecanini Mar 30, 2022
6c1f6dc
Uses aggregator to handle room name change events
ericdecanini Mar 31, 2022
7f64c62
Adds missing room member update call during incremental syncs
ericdecanini Mar 31, 2022
25ca684
Improves code reuse and readability
ericdecanini Apr 6, 2022
c650843
Merge remote-tracking branch 'origin/develop' into bugfix/eric/wrong-…
ericdecanini Apr 7, 2022
981d157
Fixes errors in RoomSyncHandler
ericdecanini Apr 7, 2022
c1b1386
Replaces MatrixItem fromJson with User.toMatrixItem
ericdecanini Apr 7, 2022
6c3c309
Combines public initial and incremental handle sync methods into one
ericdecanini Apr 7, 2022
304e2f1
Improves code readability
ericdecanini Apr 7, 2022
669af4d
Removes unneeded method
ericdecanini Apr 7, 2022
4465525
Fixes import error
ericdecanini Apr 7, 2022
de8cc07
Removes unused import
ericdecanini Apr 7, 2022
b88eaf1
Removes usage of MatrixItem.UserItem internally
ericdecanini Apr 8, 2022
e80386b
Removes clearing usersToFetch in aggregator
ericdecanini Apr 13, 2022
f103d46
Adds exception safety to fetch users and makes it a single transaction
ericdecanini Apr 13, 2022
5d5a06b
Changes null check timing when fetching users
ericdecanini Apr 13, 2022
2337b18
Reorders val declaration of eventUserId and roomMember
ericdecanini Apr 13, 2022
8964b55
Adds empty check before saving user entities
ericdecanini Apr 13, 2022
5f949e9
Reformats not empty check
ericdecanini Apr 13, 2022
dd988d0
Simplifies handleIncrementalSync logic
ericdecanini Apr 13, 2022
8b80cf0
Restores debug log
ericdecanini Apr 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import org.matrix.android.sdk.internal.database.query.where
import org.matrix.android.sdk.internal.di.UserId
import org.matrix.android.sdk.internal.session.events.getFixedRoomMemberContent
import org.matrix.android.sdk.internal.session.sync.SyncResponsePostTreatmentAggregator
import org.matrix.android.sdk.internal.session.user.UserEntityFactory
import javax.inject.Inject

internal class RoomMemberEventHandler @Inject constructor(
Expand Down Expand Up @@ -58,10 +57,6 @@ internal class RoomMemberEventHandler @Inject constructor(
// but we want to preserve presence record value and not replace it with null
getExistingPresenceState(realm, roomId, userId))
realm.insertOrUpdate(roomMemberEntity)
if (roomMember.membership.isActive()) {
val userEntity = UserEntityFactory.create(userId, roomMember)
realm.insertOrUpdate(userEntity)
}
Comment on lines -61 to -64

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ganfra was there any purpose to this being here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this is the way to have local User created from RoomMember state event. If you remove this, we'll loose the avatar/display name of lots of users (which is the same than a RoomMember but outside the context of a room.)
If we remove this, we should take care of fetching profile of users everywhere, which is not that great...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ahh I see now


// check whether this new room member event may be used to update the directs dictionary in account data
// this is required to handle correctly invite by email in DM
Expand Down