| Age | Commit message (Collapse) | Author |
|
- URISyntaxException was not caught in url/normalize, causing
normalization failure which leads to verification failure when there is
one invalid URL, even though valid URL exists
- skip non-HTTP(S) urls when verifying
|
|
utils: add url utilities for accurate comparison
- add url/normalize taht reconstructs URL, strips unnecessary
components, reorders query string and ensures determinism
- add url/url= that uses url/normalize
receiver: normalize URLs before checking and putting in queue
- use url= and normalize from utils.url
- rename verify-request to check-request to avoid confusion with
verifier.clj
verifier: check if source includes target URL more accurately
- implement url/extract with robinst/autolink-java, which extracts a
vector a URLs from string
- check if source includes target by
1. extracting all links from source body
2. normalizing all links before comparing with target link (with url=
func)
- refactor verify-headers -> match-content-types, with a higher order
function and clearer description
retriever, storage: use url= instead of = when comparing urls
|
|
- implement a functional rewrite of core.clj, no more `def`, no more
states. callable from an REPL
- handle SIGINT/SIGTERM and perform graceful shutdown
- print clear logs when starting up and shutting down
|
|
- /api/likes removed
- /api/replies removed
- /api/reposts removed
|
|
- remove deprecated weepinbell.ui
- create a ClojureScript project named bellsprout
- use vanilla cljs and Pico CSS
- can find and send webmentions in/to weepinbell
- display webmentions in cards
- <noscript> reminder
- embed frontend in weepinbell
- opt-in, weepinbell can work without a frontend
- serve static files from disk for now; might support a simple reverse
proxy in the future
- test frontend route (OK when enabled; 404 when disabled)
fe: ?show param that shows webmentions when set to true
equivalent of clicking "Find" button manually
|
|
|
|
|
|
|
|
1. If webmention does not exist, data is {:webmention nil} rather than
nil. So it always assume webmention is found. It should check further.
2. The status code is 400 rather than 404.
|
|
|
|
- remove reducer spec warninns, test spec before compiling instead.
- cover more forms of webhook.clj, webhook_presets.clj,
microformats/reducer.clj, microformats/searcher.clj, http/downloader.clj
- remove unused code from config.clj
- format all tests
|
|
property
|
|
- use-items now returns nil for non-collection or empty input
- use-prop gets the first element of property if it's a plain map
- search-photo correctly fallback to org photo when author photo is nil
|
|
|
|
|
|
|
|
|
|
|
|
- remove deprecated microformats.wrapper
- add microformats.searcher and microformats.reducer
|
|
- replace mf2j with mf2clj
- remove utils.clj completely
- refactored processor, use Chain of Responsibilities pattern and pass
around maps to reuse data (so we don't have to make a separate HTTP
request just to parse microformats, etc.)
- test: add more test cases to verifier test
- test: add basic test cases to all processing steps
- add more logging to each processing steps. good for debugging.
|
|
|
|
- processor will call hook functions with webmention data
- refactor webhook.clj massively
- add dynamic parameter substitution for urls, e.g. {source} {target}
{event}......
- add config option :webhook-request, a function with parameters [hook,
data] that returns a map (resembling {:headers ... :body ...}).
webhook.clj uses this function to generate payload.
- allow map besids URL string in config option :webhook. if it's a URL,
sends webhook request to it with payload generated by :webhook-request;
if it's a map, it should be like {:url ... :request-fn ...}, which
specifies a payload generator.
- add request-fn preset :ntfy
|
|
|
|
|
|
|
|
|
|
microformats: fix assertion error
:post and :pre hooks enforce spec but for now we just need to log these
issues and analyze them. no need to throw exception for that.
---
receiver: fix NullPointerException when source/target is nil
when an incomplete webmention request (e.g. only source is included in
POST parameters), it throws Exception:
java.lang.NullPointerException: Cannot invoke "Object.toString()"
because "s" is null
this is because `remove-anchor` (which will soon be replaced with
weepinbell.utils.url/normalize) did not check if `url` is string or nil.
---
utils: fix incorrectly derefing a map
|
|
wrapper: use spec to check webmention data before writing to storage
warn when data does not meet spec (corrupted). for now we're not dealing
with corruption, just collect logs and analyze.
microformats: use spec to validate data and warn if it's in bad form
microformats: move parsers/wrappers to one sub-directory
storage: move weepinbell.spec to weepinbell.storage.spec
|
|
starting from now, every commit should be cljfmt-fixed
|
|
with new http client, all Exceptions are caught internally and returned
as value. there's no need catching Exceptions in verifier
fix
|
|
org.httpkit.client
comment
|
|
processor: tidy up log msg and level; improve code style
- all messages start with a lower-case letter
- all webmention-related logging contains first 8-digit of its id
- use WARN level when something is deleted, not INFO
- use WARN level when exceptional cases happen, not ERROR
- get rid of emojis in log messages
utils: digest-short function for logging
verifier: tidy up log messages; improve code style
- use `cond` instead of nested `if`s
- same message format as processor's logs
webhook: tidy up log messages; send webhooks robustly
- use same logging formats as processor and verifier
- handle error, 4xx, 5xx status and log them
- move logging inside webhook module, away from core.clj
|
|
1. nil guard `status`
2. upgrade `http-kit` to fix SNI issue
3. match Content-Type correctly
|
|
Instead of exit, it should create the data file. The previous approach
cause issues when testing and building.
|
|
also refactored weepinbell.utils.digest. business logic no longer depend
on a concrete algorithm like SHA-256 or MD5, it's just a `digest`
function whose defaults can be replaced anytime.
|
|
|
|
used java.net to create a small validator that passes the test
refactor: rename validator to url, and move other url funcs here
|
|
since http-kit handle both server and client, hato as a client can be
replaced
|
|
|
|
use Java introp instead of cljc-md5, which is heavy on dependencies.
|
|
|
|
and test case #7
|
|
test(receiver): URL anchor removal test
fix: not putting the correct wm object in queue after anchor removal
|
|
|
|
apparently we need to in tests
|
|
|
|
|
|
|
|
|
|
|