Commit Graph

969 Commits

Author SHA1 Message Date
FoxxMD
9e364c3e28 Refactor cache instantiation to use async method 2022-10-17 11:42:58 -04:00
FoxxMD
acd4b54d8e Implement typings for cache-manager-redis-store@3^ 2022-10-17 11:42:39 -04:00
FoxxMD
98a8568eb6 fix: Add missing else condition 2022-10-13 16:17:43 -04:00
FoxxMD
457f947603 fix: Further improvements for influxdb logging
* Suppress write failure warnings to reduce noise in log
  * Can be toggled using debug flag in config
2022-10-13 12:34:11 -04:00
FoxxMD
7fb69ae67a fix: Attempt to decrease frequency of influxdb timeout errors
* Use keep-alive http agent to reuse open connections
* Decrease max batch size and flush interval to payload sent is smaller
* Add debug logging for fail/success/retry events on flush
2022-10-13 11:39:45 -04:00
FoxxMD
2241d40e49 fix: Fix custom footer never loading
Custom footer needs to be loaded AFTER resources are set
2022-10-13 08:58:12 -04:00
FoxxMD
a3ca3f17ec refactor(recent): Log image parsing error with cause 2022-10-12 14:39:21 -04:00
FoxxMD
f527a17fa2 feat(modnote): Implement existing note check before adding note to replace allowDuplicates
* Use "modActions" authorIs filtering to check note prior to adding note using "existingNoteCheck" property
  * Refactors concept of "allowDuplicates" to allow any arbitrary modActions test to be used
* Provide convenience ModLogCriteria generation for "existingNoteCheck" based on boolean (emulates allowDuplicates functionality)
2022-10-12 13:00:47 -04:00
FoxxMD
e98364eae9 feat(filter): Improve modAction filtering functionality
* Implement filtering activityType by "false" in order to return actions/notes not added to a specific activity
* Implement "referencesCurrentActivity" property to allow filtering by actions/notes that are associated with the activity being processed
* Implement using "count" for "current" search to enable criteria condition based on presence or non-presence of current action/note passing
2022-10-12 12:58:49 -04:00
FoxxMD
8b125d7433 feat(ui): Improve visibility and resilience for live log stream
* Tie loading indicator to live stream status and display error if one occurs
  * Add manual restart action to end of error
* Restart stream automatically if reader ends, up to 3 retries
2022-10-11 12:19:55 -04:00
FoxxMD
6ee060c5ce fix(logs): Remove listeners from log stream event emitter before end of response to prevent write-after-end errors 2022-10-11 12:18:00 -04:00
FoxxMD
9b12d0b2b3 feat(bot): Improve log wording for manager loading phase 2022-10-11 10:51:00 -04:00
FoxxMD
b174c7928a feat(ui): Add favicon files 2022-10-11 10:49:57 -04:00
FoxxMD
74dfe9258a fix(filter): Fix mod action note filtering assignment 2022-10-10 15:00:39 -04:00
FoxxMD
1cf8855a24 feat(testing): Implement initial author filter tests 2022-10-10 12:06:08 -04:00
FoxxMD
adc69894fc fix(filter): Fix detecting empty filter when using 'replace' filter default behavior 2022-10-10 11:03:57 -04:00
FoxxMD
3435c683c8 feat(filter): Add author flair item criteria 2022-10-05 11:24:44 -04:00
FoxxMD
f0032cd433 Bump version 2022-10-05 08:56:53 -04:00
FoxxMD
542aa26c62 feat(history): Implement ratio comparison #112 2022-10-03 13:25:05 -04:00
FoxxMD
3faf4ca3dc fix: Fix wiki location usage when getting from subreddit resources 2022-09-28 10:34:48 -04:00
FoxxMD
2f35b82d5e feat(history): Log failure results for easier rule tuning 2022-09-28 10:25:26 -04:00
FoxxMD
027f4087e3 refactor: Improve activity source parse and comparison
* Implement a DTO class for activity source to make parts usage (type, identifier) and matching easier
* Implement regex to parse type and identifier from activity source string
* Refactor activity source interface/types to better distinguish as string, data, and class
2022-09-26 12:07:24 -04:00
FoxxMD
5d53571ec0 fix: Fix typo in default footer
Thanks u/SampleOfNone for catching that
2022-09-22 10:59:57 -04:00
FoxxMD
b3df1b4d41 Update default confidence for MHS based on feedback from Welton 2022-09-20 10:56:39 -04:00
FoxxMD
9bb95106ba feat(mhs): Add default confidence threshold 2022-09-20 09:35:38 -04:00
FoxxMD
02414478bf feat: Implement rule that tests activity content against moderatehatespeech.com ML model using api #110
* Add mhs rule type and MHS credentials interface
* Implement MHS rule with similar criteria options to sentiment
* Allow testing against author history content
2022-09-19 16:20:35 -04:00
FoxxMD
8b0a582464 fix(recent): Empty viable activity list if processing activity is required to be reference but is not a valid type 2022-09-19 11:46:20 -04:00
FoxxMD
d1db5f4688 fix: Fix subreddit filtering result when no subreddit criteria are present
Should return all items instead of none. Thanks u/SampleOfNone for helping track this down with examples.
2022-09-19 10:01:39 -04:00
FoxxMD
57cfcebe9f fix: Set default invites to empty array on heartbeat 2022-09-16 14:34:28 -04:00
FoxxMD
07ecc505ff fix: Check bot entity exists before getting invites 2022-09-16 14:29:34 -04:00
FoxxMD
81213686ce Merge branch 'subredditInviteUI' into edge
# Conflicts:
#	src/Subreddit/SubredditResources.ts
2022-09-16 13:31:37 -04:00
FoxxMD
08735d505a refactor(manager): Improve wiki CRUD and onboarding initial config
* Refactor write/read into separate functions
* Improve error hinting for wiki read/write/permissions WRT mod/oauth permissions
* Remove superfluous error wrapping to reduce logging length for wiki errors
* More debug logging for onboarding process
* Don't return error if manager fails to parse after all onboarding complete (not critical)
2022-09-16 13:27:41 -04:00
FoxxMD
1a62c752c1 feat(ui): Improve finished onboarding response
* don't redirect on error
* increase delay to redirect on success
2022-09-16 13:24:09 -04:00
FoxxMD
6aa7367297 fix(client): Improve responses dependent on server information
* run initHeartbeat on any GET route that render a page so that user doesn't get access denied on initial app load
* Force client refresh if no invite found on initial check for onboarding landing
2022-09-16 13:22:44 -04:00
FoxxMD
cf9583227c feat: Add subredditExists function to snoowrap client
Reddit returns 403 if the subreddit exists but is private. Using this function wraps the error so we can just get boolean back along with subreddit object, if successful
2022-09-16 13:20:07 -04:00
FoxxMD
aa505ba3f2 feat: Improve external resource fetching in subreddit resources
* Add "default" hint to force val to a url or wiki key if neither is detected but know it should be one of them
* Refactor wiki/url fetching into own functions for better reuseability
* Implement mod permission getter function to check for valid permissions on wiki page error
* Improve error hints on wiki page read failure
2022-09-16 13:19:23 -04:00
FoxxMD
a0182d89ca feat: util function for generating full wiki urls 2022-09-16 13:16:26 -04:00
FoxxMD
d46f0a5be8 fix: Improve error detection for log transform
Check for error name OR stack existence
2022-09-16 13:16:06 -04:00
FoxxMD
4a55d35e14 feat(filter): Rename createdAt to createdOn
Better naming
2022-09-15 13:27:41 -04:00
FoxxMD
1284051fe8 fix(filter): Fix copy-past typo for createdAt 2022-09-15 11:24:53 -04:00
FoxxMD
00680494a3 feat(filter): Add createdAt activity criteria matching
* May be a string or array of strings. Passes if any expression matches
  * Value may be a convience day-of-week value (mon, tues, wed...)
  * or a cron expression
2022-09-15 11:22:04 -04:00
FoxxMD
77856a6d97 chore: Bump version 2022-09-14 15:30:12 -04:00
FoxxMD
b216cd08e1 Merge branch 'edge' into subredditInviteUI 2022-09-14 15:27:14 -04:00
FoxxMD
052c1218c6 feat(ui): Add home logo 2022-09-14 15:26:59 -04:00
FoxxMD
c2343683bb Finish implementation accept flow 2022-09-14 15:12:33 -04:00
FoxxMD
fcf718f1d0 fix(ui): Fix typo in reddit status indicator switch 2022-09-14 13:21:48 -04:00
FoxxMD
77f848007a Implement subreddit onboarding accept process
* Refactor some manager/bot methods to be more accessible for invites/wiki
* Add routes and authentication for getting invite information and checking user is moderator of subreddit
* Add route for accept invite and completing onboarding guest/config
2022-09-14 13:20:53 -04:00
FoxxMD
bc8be3608b Use methods for bot entity subreddit invite crud 2022-09-13 10:33:55 -04:00
FoxxMD
1b69cd78bb Refactor subreddit invites to use db and add interface
* Refactor to use db instead of cache for persisting invites
* Implement subreddit invite helper page
* Add initial config and guests as optional data for invite
* Refactor bot to use db subreddit invite and auto-accept when no config/guests

TODO: subreddit accept page, mod authorization, initial config usage, and documentation
2022-09-12 16:29:41 -04:00
FoxxMD
e736379f85 feat(ui): Improve guest expiration interface
* Set default time to 24 hours
* Add label and tooltip for expiration datetime picker
2022-09-07 11:57:29 -04:00