From bb6a507f1f171658c0a9bef3b5fe8af4dc02f5e5 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Mon, 21 Nov 2016 05:49:59 +0000 Subject: [PATCH] Add the "votes" header property. On polls, this is the maximum number of votes per ballot in response to this poll (0 is the same as 1). On ballots, this is the bit-field of votes submitted by the user (e.g. bit 0 set is a vote for answer 1, bit 1 for answer 2, etc.). For normal messages, this field has no current use. --- src/sbbs3/js_msgbase.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sbbs3/js_msgbase.c b/src/sbbs3/js_msgbase.c index c3f6736646..c29f4a0152 100644 --- a/src/sbbs3/js_msgbase.c +++ b/src/sbbs3/js_msgbase.c @@ -1169,6 +1169,7 @@ static JSBool js_get_msg_header_resolve(JSContext *cx, JSObject *obj, jsid id) LAZY_UINTEGER("times_downloaded", p->msg.hdr.times_downloaded, JSPROP_ENUMERATE); LAZY_UINTEGER("data_length", smb_getmsgdatlen(&(p->msg)), JSPROP_ENUMERATE); LAZY_STRING("date", msgdate((p->msg).hdr.when_written,date), JSPROP_ENUMERATE); + LAZY_UINTEGER("votes", p->msg.hdr.votes, JSPROP_ENUMERATE); if(name==NULL || strcmp(name,"reply_id")==0) { if(name) free(name); -- GitLab