-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: group call voipIds not considering backend, application and scope
- Loading branch information
1 parent
9cc7c0e
commit f010b51
Showing
3 changed files
with
44 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
class VoipId { | ||
final String roomId; | ||
final String callId; | ||
final String? callBackendType; | ||
final String? application; | ||
final String? scope; | ||
|
||
String get id => '$roomId:$callId'; | ||
|
||
factory VoipId.fromId(String id) { | ||
final int lastIndex = id.lastIndexOf(':'); | ||
return VoipId( | ||
roomId: id.substring(0, lastIndex), | ||
callId: id.substring(lastIndex + 1), | ||
); | ||
} | ||
|
||
VoipId({required this.roomId, required this.callId}); | ||
VoipId({ | ||
required this.roomId, | ||
required this.callId, | ||
this.callBackendType, | ||
this.application, | ||
this.scope, | ||
}); | ||
|
||
@override | ||
bool operator ==(Object other) => | ||
identical(this, other) || | ||
other is VoipId && roomId == other.roomId && callId == other.callId; | ||
other is VoipId && | ||
roomId == other.roomId && | ||
callId == other.callId && | ||
callBackendType == other.callBackendType && | ||
application == other.application && | ||
scope == other.scope; | ||
|
||
@override | ||
int get hashCode => roomId.hashCode ^ callId.hashCode; | ||
int get hashCode => | ||
roomId.hashCode ^ | ||
callId.hashCode ^ | ||
callBackendType.hashCode ^ | ||
application.hashCode ^ | ||
scope.hashCode; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters