Fix media notifications and photo bubbles
This commit is contained in:
@@ -873,6 +873,7 @@ public sealed class ApiSmokeTests : IDisposable
|
||||
[Fact]
|
||||
public async Task SyncDoesNotCreateTextOnlyMessageForGenericMediaPreviewOnlyIncomingUpdate()
|
||||
{
|
||||
var pushNotifications = new RecordingPushNotificationService();
|
||||
var marker = Guid.NewGuid().ToString("N");
|
||||
var externalId = $"generic-media-sync-chat-{marker}";
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
@@ -899,7 +900,9 @@ public sealed class ApiSmokeTests : IDisposable
|
||||
{
|
||||
services.RemoveAll<IHostedService>();
|
||||
services.RemoveAll<IMaxBridgeClient>();
|
||||
services.RemoveAll<IPushNotificationService>();
|
||||
services.AddSingleton<IMaxBridgeClient>(bridge);
|
||||
services.AddSingleton<IPushNotificationService>(pushNotifications);
|
||||
});
|
||||
});
|
||||
using var client = factory.CreateClient();
|
||||
@@ -926,6 +929,10 @@ public sealed class ApiSmokeTests : IDisposable
|
||||
x.ChatId == chat.Id &&
|
||||
x.ExternalId != null &&
|
||||
x.ExternalId.StartsWith("preview:")));
|
||||
var previewPush = Assert.Single(pushNotifications.SentMessages);
|
||||
Assert.Equal(chat.Id, previewPush.Chat.Id);
|
||||
Assert.Equal("\u041c\u0435\u0434\u0438\u0430", previewPush.Message.Text);
|
||||
Assert.Equal(MessageDirection.Incoming, previewPush.Message.Direction);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user