feat(bot): add online/offline wizard locations
PR Checks / test-and-build (pull_request) Successful in 15m52s
PR Checks / test-and-build (pull_request) Successful in 15m52s
Add format and location steps to the Telegram /newsession wizard, persist offline addresses in sessions.location_address, and render online links/offline addresses in schedule messages. Bump version to 3.10.0.
This commit is contained in:
+19
-2
@@ -95,7 +95,7 @@ public sealed class CreateSessionHandlerIntegrationTests(CreateSessionHandlerPos
|
||||
new PlatformUser(PlatformKind.Telegram, "111111111", "Test GM", "test_gm"),
|
||||
new PlatformGroup(PlatformKind.Telegram, "222222222", "Test Group"),
|
||||
"Test Adventure",
|
||||
string.Empty,
|
||||
"https://vtt.example/game",
|
||||
[DateTimeOffset.UtcNow.AddDays(1)],
|
||||
null,
|
||||
null,
|
||||
@@ -103,7 +103,8 @@ public sealed class CreateSessionHandlerIntegrationTests(CreateSessionHandlerPos
|
||||
"Integration regression test",
|
||||
"Online",
|
||||
240,
|
||||
true),
|
||||
true,
|
||||
"Online room notes"),
|
||||
CancellationToken.None);
|
||||
|
||||
Assert.True(result.Success, result.ErrorMessage);
|
||||
@@ -126,5 +127,21 @@ public sealed class CreateSessionHandlerIntegrationTests(CreateSessionHandlerPos
|
||||
|
||||
var ownerCount = (long)(await command.ExecuteScalarAsync() ?? 0L);
|
||||
Assert.Equal(1, ownerCount);
|
||||
|
||||
await using var sessionCommand = new NpgsqlCommand(
|
||||
"""
|
||||
SELECT join_link, format, location_address
|
||||
FROM sessions
|
||||
WHERE batch_id = @batch_id
|
||||
""",
|
||||
connection);
|
||||
sessionCommand.Parameters.AddWithValue("batch_id", result.BatchId.Value);
|
||||
|
||||
await using var reader = await sessionCommand.ExecuteReaderAsync();
|
||||
Assert.True(await reader.ReadAsync());
|
||||
Assert.Equal("https://vtt.example/game", reader.GetString(0));
|
||||
Assert.Equal("Online", reader.GetString(1));
|
||||
Assert.Equal("Online room notes", reader.GetString(2));
|
||||
Assert.False(await reader.ReadAsync());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user