diff options
author | Anonymized <anonymous@example.com> | 2018-01-20 03:06:12 +0100 |
---|---|---|
committer | Anonymized <anonymous@example.com> | 2018-01-20 03:06:12 +0100 |
commit | 4aa02f873e3c40d10e2fdef1bba28a3d8a37bb51 (patch) | |
tree | 4443b2e030c9b5f0448f83d44a3d2abe98bd7320 | |
parent | fd5b79ba87de84b149a995bfdecf4dd0d3e37a0a (diff) | |
download | gnunet-guile2-4aa02f873e3c40d10e2fdef1bba28a3d8a37bb51.tar.gz gnunet-guile2-4aa02f873e3c40d10e2fdef1bba28a3d8a37bb51.zip |
c3b2: small fixes
- if the download timeouts then the file is #f, filter it
- the published file is only the message
-rwxr-xr-x | prototypes/c3b2/web.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/prototypes/c3b2/web.scm b/prototypes/c3b2/web.scm index aab9ce7..20e53f1 100755 --- a/prototypes/c3b2/web.scm +++ b/prototypes/c3b2/web.scm | |||
@@ -63,7 +63,10 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@" | |||
63 | 63 | ||
64 | (define (c3b2/topics) | 64 | (define (c3b2/topics) |
65 | "Return vertices of topics ie. messages without parent" | 65 | "Return vertices of topics ie. messages without parent" |
66 | (map get (fs:find 'parent #f))) | 66 | (map utf8->string |
67 | (filter values | ||
68 | (map (lambda (uri) (download %configuration uri)) | ||
69 | (search %configuration '("c3b2://v1/topic")))))) | ||
67 | 70 | ||
68 | (define (c3b2/topic-add! body) | 71 | (define (c3b2/topic-add! body) |
69 | (let ((new-topic `((kind . message) | 72 | (let ((new-topic `((kind . message) |
@@ -95,7 +98,7 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@" | |||
95 | ,body)))) | 98 | ,body)))) |
96 | 99 | ||
97 | (define (template/topic topic) | 100 | (define (template/topic topic) |
98 | `(div (p ,(vertex-ref topic 'body)))) | 101 | `(div (p ,topic))) |
99 | 102 | ||
100 | (define (template/index topics) | 103 | (define (template/index topics) |
101 | `(,(map template/topic topics) | 104 | `(,(map template/topic topics) |