element-hq / element-hq/element-ios
Join process does finish if room has been previously left
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
1. Leave room R
2. Open room R preview screen
3. Join room R
### Outcome
#### What did you expect?
The join process to finish normally.
#### What happened instead?
It appears that the `[MXSession onJoinedRoom:success:]` waits for the `kMXRoomInitialSyncNotification` to call back `[MXSession joinRoom:viaServers:withThirdPartySigned:success:failure:]`. In this case `[MXEventTimeline handleJoinedRoomSync:onComplete:]` is called during the next sync but instead of posting `kMXRoomInitialSyncNotification` a `kMXRoomDidFlushDataNotification` is posted and that's why the flow is broken.
### Your phone model
_No response_
### Operating system version
_No response_
### Application version
_No response_
### Homeserver
_No response_
### Will you send logs?
No
Contributor guide
Research direction
Start with MXSession onJoinedRoom:success: and joinRoom:viaServers:withThirdPartySigned:success:failure:, then trace MXEventTimeline handleJoinedRoomSync:onComplete: during the next sync. Compare handling of kMXRoomInitialSyncNotification with kMXRoomDidFlushDataNotification for a room that was previously left. Done means the join process finishes normally after leaving, previewing, and rejoining the room.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100