making ice candidates write to DB properly
This commit is contained in:
@@ -163,8 +163,8 @@ public sealed class RtcCallService
|
||||
string username,
|
||||
string candidate,
|
||||
string? sdpMid,
|
||||
int? sdpMLineIndex,
|
||||
string direction)
|
||||
int? sdpMLineIndex/*,
|
||||
string direction*/)
|
||||
{
|
||||
await _db.Create("rtc_ice_candidates", new RtcIceCandidate
|
||||
{
|
||||
@@ -173,7 +173,7 @@ public sealed class RtcCallService
|
||||
Candidate = candidate,
|
||||
SdpMid = sdpMid,
|
||||
SdpMLineIndex = sdpMLineIndex,
|
||||
Direction = direction,
|
||||
// Direction = direction,
|
||||
CreatedAt = DateTime.UtcNow
|
||||
});
|
||||
}
|
||||
@@ -208,7 +208,7 @@ public sealed class RtcCallService
|
||||
{
|
||||
var candidates = await _db.Select<RtcIceCandidate>("rtc_ice_candidates");
|
||||
return candidates
|
||||
.Where(x => x.ChannelId == channelId && x.Username != username && x.Direction == direction)
|
||||
.Where(x => x.ChannelId == channelId && x.Username != username /*&& x.Direction == direction*/)
|
||||
.OrderBy(x => x.CreatedAt)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user