From 6f3763f452ba55ee6ddd9f63f5bc523807e7288f Mon Sep 17 00:00:00 2001 From: default Date: Sat, 11 May 2024 19:15:18 +0200 Subject: [PATCH] Show 'Event' object types as Notes. --- format.c | 5 ++--- html.c | 1 + snac.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/format.c b/format.c index 8d51351..631c11c 100644 --- a/format.c +++ b/format.c @@ -311,9 +311,8 @@ xs_str *sanitize(const char *content) s = xs_str_cat(s, s2); } else { - /* else? just show it with encoded code.. that's it. */ - xs *el = encode_html(v); - s = xs_str_cat(s, el); + if (strcmp(v, "")) + s = xs_str_cat(s, "

"); } } else { diff --git a/html.c b/html.c index 12dba6b..201456e 100644 --- a/html.c +++ b/html.c @@ -1407,6 +1407,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, else if (!xs_match(type, POSTLIKE_OBJECT_TYPE)) { /* skip oddities */ + snac_debug(user, 1, xs_fmt("html_entry: ignoring object type '%s' %s", type, id)); return NULL; } diff --git a/snac.h b/snac.h index c585e3f..239f27a 100644 --- a/snac.h +++ b/snac.h @@ -29,7 +29,7 @@ extern int dbglevel; #define L(s) (s) -#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video" +#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video|Event" int mkdirx(const char *pathname);