fix: make sure room is postLoaded before starting calls
more logging
This commit is contained in:
parent
5cf4a884ec
commit
06728b4b75
|
|
@ -129,7 +129,14 @@ extension FamedlyCallMemberEventsExtension on Room {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
throw MatrixSDKVoipException(
|
throw MatrixSDKVoipException(
|
||||||
'User ${client.userID}:${client.deviceID} is not allowed to send famedly call member events in room $id, canJoinGroupCall: $canJoinGroupCall, room.canJoinGroupCall: $groupCallsEnabledForEveryone',
|
'''
|
||||||
|
User ${client.userID}:${client.deviceID} is not allowed to join famedly calls in room $id,
|
||||||
|
canJoinGroupCall: $canJoinGroupCall,
|
||||||
|
groupCallsEnabledForEveryone: $groupCallsEnabledForEveryone,
|
||||||
|
needed: ${powerForChangingStateEvent(EventTypes.GroupCallMember)},
|
||||||
|
own: $ownPowerLevel}
|
||||||
|
plMap: ${getState(EventTypes.RoomPowerLevels)?.content}
|
||||||
|
''',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -769,13 +769,25 @@ class VoIP {
|
||||||
String? scope, {
|
String? scope, {
|
||||||
bool preShareKey = true,
|
bool preShareKey = true,
|
||||||
}) async {
|
}) async {
|
||||||
|
// somehow user were mising their powerlevels events and got stuck
|
||||||
|
// with the exception below, this part just makes sure importantStateEvents
|
||||||
|
// does not cause it.
|
||||||
|
await room.postLoad();
|
||||||
|
|
||||||
if (!room.groupCallsEnabledForEveryone) {
|
if (!room.groupCallsEnabledForEveryone) {
|
||||||
await room.enableGroupCalls();
|
await room.enableGroupCalls();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!room.canJoinGroupCall) {
|
if (!room.canJoinGroupCall) {
|
||||||
throw MatrixSDKVoipException(
|
throw MatrixSDKVoipException(
|
||||||
'User ${client.userID}:${client.deviceID} is not allowed to join famedly calls in room ${room.id}, canJoinGroupCall: ${room.canJoinGroupCall}, room.canJoinGroupCall: ${room.groupCallsEnabledForEveryone}',
|
'''
|
||||||
|
User ${client.userID}:${client.deviceID} is not allowed to join famedly calls in room ${room.id},
|
||||||
|
canJoinGroupCall: ${room.canJoinGroupCall},
|
||||||
|
groupCallsEnabledForEveryone: ${room.groupCallsEnabledForEveryone},
|
||||||
|
needed: ${room.powerForChangingStateEvent(EventTypes.GroupCallMember)},
|
||||||
|
own: ${room.ownPowerLevel}}
|
||||||
|
plMap: ${room.getState(EventTypes.RoomPowerLevels)?.content}
|
||||||
|
''',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue