web: don't render invalid share events

This commit is contained in:
William Casarin 2022-11-15 15:13:12 -08:00
parent b8a24d9dd4
commit ae6102b4f6

View file

@ -90,14 +90,14 @@ function render_replying_to(model, ev) {
` `
} }
function render_unknown_event(model, ev) { function render_unknown_event(damus, ev) {
return "Unknown event" return "Unknown event " + ev.kind
} }
function render_boost(damus, view, ev, opts) { function render_boost(damus, view, ev, opts) {
//todo validate content //todo validate content
if (!ev.json_content) if (!ev.json_content)
return render_unknown_event(ev) return ""
//const profile = model.profiles[ev.pubkey] //const profile = model.profiles[ev.pubkey]
opts.boosted = { opts.boosted = {