Commit Graph
100 Commits
Author SHA1 Message Date
Stevan Freeborn 7826e835ef feat(youtube): multiple stream notifications
Refactors the notification storage to support multiple stream IDs
using a ConcurrentDictionary. This ensures that the bot can track and
ignore duplicate notifications for multiple streams within a
rolling 24-hour window, rather than only tracking the single most
recent stream.

- Updated ILastPostedStreamStore to include RemoveValuesOlderThan24Hours.
- Switched LastPostedStreamStore to use ConcurrentDictionary with UTC timestamps.
- Injected TimeProvider to enable deterministic testing of time-based expiration.
- Added automatic cache pruning in NotificationHandler on every request.
- Renamed Unit/LastPostedStreamStore.cs to Unit/LastPostedStreamStoreTests.cs and expanded test coverage.
2026-01-11 10:32:57 -06:00
Stevan Freeborn 07660a0440 Merge pull request #10 from StevanFreeborn/stevanfreeborn/fix/8-add-retry-logic
fix: make initial connection more resilient with retry logic
2025-09-11 14:47:18 -05:00
Stevan Freeborn e427c5936f chore: run dotnet format 2025-09-11 10:39:44 -05:00
Stevan Freeborn 96ba7e5fe7 fix: implement retry logic for establishing initial websocket connection with an expontential backoff 2025-09-10 16:44:46 -05:00
Stevan Freeborn 46d4cdf313 feat: WIP on retry logic 2025-09-09 15:12:59 -05:00
Stevan Freeborn e48c6da3f1 Merge pull request #7 from StevanFreeborn/stevanfreeborn/fix/remove-string-builder
fix: remove unnecessary string builder
2025-06-16 19:55:14 -07:00
Stevan Freeborn b6914f8414 fix: remove unnecessary string builder 2025-06-16 21:46:51 -05:00
Stevan Freeborn f08772d4fd Merge pull request #6 from StevanFreeborn/stevanfreeborn/chore/modify-logging
chore: log warning instead of error and log additional details if web socket exception occurred
2025-06-16 09:03:15 -07:00
Stevan Freeborn ad3cda2b77 chore: log warning instead of error and log additional details if web socket exception occurred 2025-06-16 11:01:59 -05:00
Stevan Freeborn fc73614c7c Merge pull request #5 from StevanFreeborn/stevanfreeborn/fix/remove-double-quotes-from-message-format-when-present
fix: remove double quotes from start and end of message format"
2025-06-15 09:18:28 -07:00
Stevan Freeborn 168d080e04 fix: trim double quotes from message format and cleanup usings in tests 2025-06-15 11:17:13 -05:00
Stevan Freeborn e82b16454e chore: update workflow 2025-06-12 00:12:07 -05:00
Stevan Freeborn 666deb1c53 Merge pull request #4 from StevanFreeborn/stevanfreeborn/fix/infinite-loop-when-checking-to-renew-subscription
fix: stop requeuing immediately inside loop that just continually dequeues item
2025-06-05 23:19:26 -05:00
Stevan Freeborn 1afaa2bd42 fix: stop requeuing immediately inside loop that just continually dequeues item 2025-06-05 23:17:47 -05:00
Stevan Freeborn 5ec185ca84 chore: put containers in same network as seq container 2025-06-04 19:38:51 -05:00
Stevan Freeborn 6da43d1277 chore: put compose file back 2025-06-04 18:49:12 -05:00
Stevan Freeborn 0a3963f47f chore: try modifying workflow 2025-06-04 18:44:03 -05:00
Stevan Freeborn 7c4eca240a fix: modify program.cs 2025-06-04 18:35:05 -05:00
Stevan Freeborn 4889402568 chore: write variables to file properly 2025-06-04 18:14:07 -05:00
Stevan Freeborn 885895e993 chore: fix compose env variables 2025-06-04 18:10:46 -05:00
Stevan Freeborn 2007c62bcd chore: strip leading directory path from source 2025-06-04 18:04:44 -05:00
Stevan Freeborn 721d4e2769 Merge pull request #3 from StevanFreeborn/stevanfreeborn/feat/add-stream-notification
feat: add stream notification
2025-06-04 17:58:06 -05:00
Stevan Freeborn 770995f22e chore: fix bad file rename 2025-06-04 15:48:54 -05:00
Stevan Freeborn 9d8f5269b8 chore: rename file 2025-06-04 15:43:11 -05:00
Stevan Freeborn 3fa6195e18 chore: run dotnet format 2025-06-04 15:34:35 -05:00
Stevan Freeborn 17b5bdea73 docs: update README.md 2025-06-04 15:33:50 -05:00
Stevan Freeborn 8c800ce658 chore: working on preparations for deployment 2025-06-04 10:46:21 -05:00
Stevan Freeborn 8e0ec2d3d5 refactor: moving telemetry wip 2025-06-03 16:31:09 -05:00
Stevan Freeborn 852f27c7b5 chore: rework dockerfiles to account for multi project solution with centralized package+build prop management 2025-06-03 13:35:04 -05:00
Stevan Freeborn e616bdedda tests: finish adding tests for webhook 2025-06-03 12:44:02 -05:00
Stevan Freeborn 68ba283856 tests: more tests 2025-06-03 11:31:09 -05:00
Stevan Freeborn 3d0321bc42 tests: add test for notification handler 2025-06-02 11:11:36 -05:00
Stevan Freeborn 7f9404dff3 chore: stub out tests 2025-06-02 00:00:28 -05:00
Stevan Freeborn a9fe97b411 Merge branch 'stevanfreeborn/feat/add-stream-notification' of github.com:StevanFreeborn/steves-bot into stevanfreeborn/feat/add-stream-notification 2025-05-31 21:58:25 -05:00
Stevan Freeborn 390b6f56c5 tests: add tests for data client 2025-05-31 21:58:18 -05:00
Stevan Freeborn 5399372c05 fix: don't make rest api client dependent on instrumentation 2025-05-30 20:52:33 -05:00
Stevan Freeborn 7a12f2768d tests: add tests for page info 2025-05-30 17:27:23 -05:00
Stevan Freeborn cbf7598227 tests: WRITE TESTS FIRST...when will I learn 2025-05-30 15:46:20 -05:00
Stevan Freeborn c7d0df2fca tests: begin adding tests to webhook project 2025-05-29 23:01:00 -05:00
Stevan Freeborn 0d31f12012 tests: add tests for library 2025-05-29 22:41:53 -05:00
Stevan Freeborn ce45893caa refactor: extract tests to library test project 2025-05-29 00:09:19 -05:00
Stevan Freeborn 6479531126 refactor: create interface for store 2025-05-28 21:59:50 -05:00
Stevan Freeborn 887b95f798 fix: prevent duplicate stream notifications
- add store that is singleton
  to keep track of last posted
  stream and prevent
  posting twice for same stream
2025-05-28 21:43:57 -05:00
Stevan Freeborn 21adfcd3bb tests: begin moving tests to lib test project 2025-05-28 17:15:38 -05:00
Stevan Freeborn 113cdf7a82 refactor: clean up usings 2025-05-28 17:15:26 -05:00
Stevan Freeborn 2ddc472f46 feat: add Discord notification options and handlers for YouTube events 2025-05-28 17:14:55 -05:00
Stevan Freeborn 1afd17f2d1 feat: create discord message when stream goes live 2025-05-27 23:13:19 -05:00
Stevan Freeborn 992811ccad refactor: extract to handler 2025-05-27 17:10:57 -05:00
Stevan Freeborn 1669bdeebc fix: make sure it is a stream and it is live 2025-05-27 16:56:38 -05:00
Stevan Freeborn c544e33e28 feat: determine if notification is for stream or not 2025-05-27 16:48:57 -05:00
Stevan Freeborn 6543387270 feat: begin working through how we will handle resubscribing and unsubscribing 2025-05-26 22:55:08 -05:00
Stevan Freeborn 0b42739cbb feat: implement verification of subscription request 2025-05-26 12:38:04 -05:00
Stevan Freeborn a1ef35d0a7 feat: begin adding subscription to YT notifications 2025-05-26 11:56:43 -05:00
Stevan Freeborn a8de49cee3 refactor: reorganize solution for better multi-project support/management 2025-05-25 18:38:52 -05:00
Stevan Freeborn 00158dff04 fix: handle sending resume in hello event 2025-05-24 22:44:53 -05:00
Stevan Freeborn 9a3457eebf docs: update README.md 2025-05-24 13:27:14 -05:00
Stevan Freeborn 2a014bf8f8 fix: change order of resuming and make sure to reset heartbeat tracking values after canceling the heartbeat task 2025-05-24 13:20:45 -05:00
Stevan Freeborn 01f69f3b6f fix: catch json exceptions and log them 2025-05-24 12:59:07 -05:00
Stevan Freeborn cbb0be9137 chore: add README.md 2025-05-24 12:53:31 -05:00
Stevan Freeborn 4c28cb1f5a chore: use aspnet base image 2025-05-24 11:30:00 -05:00
Stevan Freeborn 064351a6df chore: fix typo in workflow 2025-05-24 11:25:08 -05:00
Stevan Freeborn eefebf13d2 chore: disable CA1848 for logging 2025-05-24 11:20:55 -05:00
Stevan Freeborn b867265c98 chore: fix workflow to account for dockerfile location change 2025-05-24 11:02:30 -05:00
Stevan Freeborn d627f11fd6 chore: move docker file up one directory 2025-05-24 11:01:31 -05:00
Stevan Freeborn 276ee12e6d chore: update dockerfile to include directory build props 2025-05-24 10:58:00 -05:00
Stevan Freeborn 35f5ba2640 chore: fix workflow. use correct build path 2025-05-24 10:55:04 -05:00
Stevan Freeborn 30d2346e10 chore: add workflow for deploying bot 2025-05-24 10:53:55 -05:00
Stevan Freeborn 2ea23144df chore: run dotnet format 2025-05-23 22:31:38 -05:00
Stevan Freeborn 3c9c45676b chore: fix workflow 2025-05-23 22:29:50 -05:00
Stevan Freeborn a29daac647 chore: add pull_request workflow 2025-05-23 22:17:54 -05:00
Stevan Freeborn 7dce08516b feat: add telemetry support with OpenTelemetry and Seq configuration 2025-05-23 20:01:55 -05:00
Stevan Freeborn 606818b00e tests: add tests for adding/removing event handlers 2025-05-23 17:41:26 -05:00
Stevan Freeborn e5dec58274 tests: stub out handler tests 2025-05-23 15:38:07 -05:00
Stevan Freeborn 30bac05ced tests: add unit tests for ReconnectDiscordEvent and update InvalidSessionDiscordEvent tests 2025-05-23 15:31:40 -05:00
Stevan Freeborn 6288f47d9a tests: enhance ConnectAsync tests and improve event handling in DiscordGatewayClient 2025-05-23 12:59:53 -05:00
Stevan Freeborn 6258d02998 tests: man i'm so proud of figuring out how to effectively unit test the gateway client =D 2025-05-23 12:09:41 -05:00
Stevan Freeborn 86b317ab4e tests: sort out gateway client testing 2025-05-23 08:59:22 -05:00
Stevan Freeborn 6c25d25ea1 tests: oh we love our tests 2025-05-22 23:00:42 -05:00
Stevan Freeborn ceb693acbc tests: add unit tests for CreateMessageRequest, DiscordMessageReference, and DiscordRestClient
refactor: update DiscordRestClient and IDiscordRestClient to use default CancellationToken
refactor: rename MessageReference to DiscordMessageReference and add DiscordMessageReferenceTypes
chore: update WelcomeMessageHandler to use new DiscordMessageReference
2025-05-22 18:02:41 -05:00
Stevan Freeborn 58dc5896ca tests: add unit tests for ResumeData and Discord event classes 2025-05-22 09:21:21 -05:00
Stevan Freeborn 02cff46d11 tests: add unit tests for Discord event types and extensions 2025-05-21 21:52:14 -05:00
Stevan Freeborn 6ae1cd413b refactor: move classes to separate files 2025-05-21 14:33:03 -05:00
Stevan Freeborn ca4aff5d2e chore: update deps 2025-05-20 15:48:56 -05:00
Stevan Freeborn 003696f826 tests: continue the climb to comprehensive test coverage 2025-05-20 15:45:02 -05:00
Stevan Freeborn 06425f4c05 tests: begin the march to test coverage 2025-05-19 22:57:32 -05:00
Stevan Freeborn bb1fadeac0 tests: fix up test project after major refactor 2025-05-18 12:23:00 -05:00
Stevan Freeborn 9af7522c29 refactor: organize things a bit 2025-05-18 12:16:14 -05:00
Stevan Freeborn db221334ca feat: implement sending welcome message 2025-05-17 15:54:00 -05:00
Stevan Freeborn 6ba7595766 feat: wip on sending welcome message 2025-05-16 22:14:21 -05:00
Stevan Freeborn 2bc63e0305 feat: expose methods on client to register event delegates 2025-05-15 22:52:51 -05:00
Stevan Freeborn d6060f658e feat: implement update presence event 2025-05-15 21:32:32 -05:00
Stevan Freeborn f5b8f7f5f4 feat: set initial presence when connecting 2025-05-15 21:17:51 -05:00
Stevan Freeborn 67602614aa fix: don't use empty close status because cannot pass description 2025-05-15 18:04:18 -05:00
Stevan Freeborn 3a2129f860 feat: making it work even better...i abandon writing tests first...😅 2025-05-15 16:07:22 -05:00
Stevan Freeborn 23a8bbb3a6 feat: it's working!!! 2025-05-15 13:13:37 -05:00
Stevan Freeborn 1f6cd90981 refactor: trying to keep operations that need locking isolated and atomic 2025-05-15 01:38:00 -05:00
Stevan Freeborn 499b1e3d4b feat: implement reconnecting 2025-05-15 00:02:40 -05:00
Stevan Freeborn 16aa4b5775 fix: correct locking issue that was preventing progress 2025-05-14 16:45:44 -05:00
Stevan Freeborn 3458890960 tests: wip trying to figure out proper way to test sequence 2025-05-14 01:24:35 -05:00
Stevan Freeborn 35d6ee5503 feat: begin working on connection management 2025-05-13 23:51:14 -05:00