snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 22fea1725536a51672c6d0ef5b26abc62ba4a1b2
parent 32ce1fb28e5ce4a80c3b87573ce521df6ee0b042
Author: default <nobody@localhost>
Date:   Mon, 29 May 2023 09:20:25 +0200

Disallow voting your own polls.

Diffstat:
Mhtml.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/html.c b/html.c @@ -900,6 +900,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, if (xs_dict_get(msg, "closed")) closed = 1; + else + if (xs_startswith(id, snac->actor)) + closed = 1; /* we questioned? closed for us */ else { /* not yet closed? check if we already voted for this */ xs *children = object_children(id);