We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcc0885 commit ae2049cCopy full SHA for ae2049c
src/Plugins/BotSharp.Plugin.MongoStorage/Repository/MongoRepository.User.cs
@@ -22,7 +22,14 @@ public partial class MongoRepository
22
return null;
23
}
24
25
- phoneSecond = phone.StartsWith("+86") ? phone.Replace("+86", "") : $"+86{phone}";
+ if (regionCode == "CN")
26
+ {
27
+ phoneSecond = (phone ?? "").StartsWith("+86") ? (phone ?? "").Replace("+86", "") : ($"+86{phone ?? ""}");
28
+ }
29
+ else
30
31
+ phoneSecond = (phone ?? "").Substring(regionCode == "US" ? 2 : 3);
32
33
34
var user = _dc.Users.AsQueryable().FirstOrDefault(x => (x.Phone == phone || x.Phone == phoneSecond)
35
&& (x.RegionCode == regionCode || string.IsNullOrWhiteSpace(x.RegionCode))
0 commit comments