Commit Graph

993 Commits

Author SHA1 Message Date
FoxxMD
6350008ec2 feat: Implement replies count detection for submissions 2022-11-01 13:12:11 -04:00
FoxxMD
43bfa3ca51 fix(ui): Add workaround for removal reason copy-to-clipboard when in unsecure context 2022-10-31 11:30:17 -04:00
FoxxMD
59d31bde84 feat(comment): Implement commenting as subreddit 2022-10-27 14:29:05 -04:00
FoxxMD
17ae7fa295 refactor(modnotes): Encapsulate filtering functionality in modnote class for future testing 2022-10-27 11:36:12 -04:00
FoxxMD
bf074487ff fix: Fix how submission/comment snoowrap entities are generated from reddit thing ids 2022-10-27 11:34:12 -04:00
FoxxMD
85e786d248 fix(filter): Re-add missing modaction filtering improvements
They were removed by a merge somewhere??
2022-10-27 09:56:45 -04:00
FoxxMD
641a7fbd63 fix(filter): Fix usernote cutoff date comparison 2022-10-27 09:50:05 -04:00
FoxxMD
0278a4d673 feat(filter): Improve building filters from config
* Fix ignoring of filters when they are plain objects
* Fix default filter merging behavior to account for "new" filter structure (named criteria)
* Add tests for building/merging filters
2022-10-26 14:43:44 -04:00
FoxxMD
d318286507 fix(cache): Fix more memory provider cache object reconstruction issues #123
Same issues as a949a4ed10 -- memory provider stores objects in memory (no serialization) so need to check for object instance before trying to reconstruct
2022-10-26 09:48:41 -04:00
FoxxMD
36221705fa fix(filter): Fix filtered usernote assignment when search type is current and no notes exist
Addresses #123
2022-10-26 09:27:15 -04:00
FoxxMD
a949a4ed10 fix(cache): Fix pre activities being wrongly reconstructed when retrieved from memory provider cache
Thanks @CryptoMaximalist for reporting the bug and providing logs!
2022-10-25 15:32:47 -04:00
FoxxMD
d67283a923 feat(filter): Add same regex/matching functionality for author flair filtering as item has 2022-10-24 13:02:27 -04:00
FoxxMD
21b2182ef0 fix(filter): Re-add missing item is criteria to filter test
Somehow got removed during refactor! Oops
2022-10-24 11:51:47 -04:00
FoxxMD
cfc96b6c82 Merge branch 'sharedBaseConfig' into edge
# Conflicts:
#	src/Subreddit/UserNotes.ts
2022-10-20 09:37:01 -04:00
FoxxMD
239d173ffd feat(config): Implement ACL for full config sharing 2022-10-20 09:35:26 -04:00
FoxxMD
fda6090ddd feat(config): Refactor manager config updates to check hydrated structure
Instead of checking wiki revision, check hydrated (with config fragments) config hash against last good config hash
2022-10-19 16:19:39 -04:00
FoxxMD
d23f87ba60 feat(config): Add config fragments to shared cache 2022-10-19 16:19:29 -04:00
FoxxMD
2941386955 feat(cache): Add force/shared options for getting content/wiki/url results from subreddit resources
* Also refactor Manager to use subreddit resources for getting wiki page (DRY)
2022-10-19 15:15:58 -04:00
FoxxMD
b2b924c01d feat(cache): Add default prefix and shared option for interacting with cache
Enables getting cache KVs from shared *always* based on logic flow
2022-10-19 15:15:01 -04:00
FoxxMD
ee20ba786b refactor: Move cache key prefix into CMCache
* Makes adding prefix cache provider agnostic
* Prepares for #115
2022-10-19 14:33:05 -04:00
FoxxMD
f71933b9b9 refactor: Improve reuseability of SubredditResources
* Extract cache related functions into own class and encapsulate pruning/key search there as well
* Refactor SubredditStates to be "re-init"-able if state frequency changes
* Simplify and SubredditSource init and configuration functionality so that class is only created once and then reconfigured if major settings change
  * Only reinstantiates stats or cache class based on setting changes
* Remove obsolete maxActionedEvents from operator/subreddit config (from pre-db code)
2022-10-19 14:13:23 -04:00
FoxxMD
e6246188ad refactor: Extract stat-related functionality from SubredditResources into its own class 2022-10-19 11:23:24 -04:00
FoxxMD
bfd5ba7816 refactor: Consolidate ttl values into well-defined object 2022-10-19 10:02:44 -04:00
FoxxMD
acbb9a8626 feat(usernote): Improve usernote filtering functionality
Same as modActions...

* Add `referencesCurrentActivity` boolean to filter by notes associated with current activity
* Add `note` string property to filter by note content (string or regular expression)
* Replace `allowDuplicates` with `existingNoteCheck` on UserNoteAction to allow for more granular note control on action
2022-10-17 15:32:47 -04:00
FoxxMD
cd8ccffa20 feat(config): Enable pulling run fragments from root subreddit config
* Refactor config fragment validation into parsing function
* Check for `runs` in config fragment
2022-10-17 13:52:12 -04:00
FoxxMD
8695058064 refactor: Seperate subreddit resources from bot resource manager 2022-10-17 13:52:09 -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