1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . Globalization ;
3
4
using System . IO ;
4
5
using System . Linq ;
5
6
using System . Net ;
@@ -253,12 +254,12 @@ public async Task<List<SignalServiceEnvelopeEntity>> GetMessages(CancellationTok
253
254
254
255
public async Task AcknowledgeMessage ( CancellationToken token , string sender , ulong timestamp ) // throws IOException
255
256
{
256
- await MakeServiceRequestAsync ( token , string . Format ( SENDER_ACK_MESSAGE_PATH , sender , timestamp ) , "DELETE" , null , NO_HEADERS ) ;
257
+ await MakeServiceRequestAsync ( token , string . Format ( new CultureInfo ( "en-US" ) , SENDER_ACK_MESSAGE_PATH , sender , timestamp ) , "DELETE" , null , NO_HEADERS ) ;
257
258
}
258
259
259
260
public async Task AcknowledgeMessage ( CancellationToken token , string uuid )
260
261
{
261
- await MakeServiceRequestAsync ( token , string . Format ( UUID_ACK_MESSAGE_PATH , uuid ) , "DELETE" , null , NO_HEADERS ) ;
262
+ await MakeServiceRequestAsync ( token , string . Format ( new CultureInfo ( "en-US" ) , UUID_ACK_MESSAGE_PATH , uuid ) , "DELETE" , null , NO_HEADERS ) ;
262
263
}
263
264
264
265
public async Task < bool > RegisterPreKeys ( CancellationToken token , IdentityKey identityKey , SignedPreKeyRecord signedPreKey , IList < PreKeyRecord > records )
@@ -439,11 +440,11 @@ public async Task RetrieveAttachmentAsync(int cdnNumber, SignalServiceAttachment
439
440
string path ;
440
441
if ( cdnPath . V2 . HasValue )
441
442
{
442
- path = string . Format ( ATTACHMENT_ID_DOWNLOAD_PATH , cdnPath . V2 . Value ) ;
443
+ path = string . Format ( new CultureInfo ( "en-US" ) , ATTACHMENT_ID_DOWNLOAD_PATH , cdnPath . V2 . Value ) ;
443
444
}
444
445
else
445
446
{
446
- path = string . Format ( ATTACHMENT_KEY_DOWNLOAD_PATH , cdnPath . V3 ) ;
447
+ path = string . Format ( new CultureInfo ( "en-US" ) , ATTACHMENT_KEY_DOWNLOAD_PATH , cdnPath . V3 ) ;
447
448
}
448
449
449
450
await DownloadFromCdnAsync ( destination , cdnNumber , path , maxSizeBytes , listener , token ) ;
@@ -467,7 +468,7 @@ public async Task RetrieveStickerAsync(FileStream destination, byte[] packId, in
467
468
}
468
469
469
470
string hexPackId = Hex . ToStringCondensed ( packId ) ;
470
- await DownloadFromCdnAsync ( destination , 0 , string . Format ( STICKER_PATH , hexPackId , stickerId ) , 1024 * 1024 , null , token ) ;
471
+ await DownloadFromCdnAsync ( destination , 0 , string . Format ( new CultureInfo ( "en-US" ) , STICKER_PATH , hexPackId , stickerId ) , 1024 * 1024 , null , token ) ;
471
472
}
472
473
473
474
/// <summary>
@@ -489,7 +490,7 @@ public async Task<byte[]> RetrieveStickerAsync(byte[] packId, int stickerId, Can
489
490
string hexPackId = Hex . ToStringCondensed ( packId ) ;
490
491
MemoryStream output = new MemoryStream ( ) ;
491
492
492
- await DownloadFromCdnAsync ( output , 0 , 0 , string . Format ( STICKER_PATH , hexPackId , stickerId ) , 1024 * 1024 , null , token ) ;
493
+ await DownloadFromCdnAsync ( output , 0 , 0 , string . Format ( new CultureInfo ( "en-US" ) , STICKER_PATH , hexPackId , stickerId ) , 1024 * 1024 , null , token ) ;
493
494
494
495
return output . ToArray ( ) ;
495
496
}
0 commit comments