/posts/:id/events incorrectly lists appeals as always being resolved. This is because events UNION together appeals and flags, which doesn't quite work because for appeals is_resolved is a method, not an attribute. is_resolved was hardcoded to true so it'd work in the UNION. This changes PostEvent to be a wrapper object around PostFlag / PostAppeal, instead of a UNION. PostEvent delegates everything to the inner flag/appeals object, so that is_resolved works correctly. Also, this incidentally fixes a problem with /posts/:id/event.xml not serializing correctly.
1.1 KiB
1.1 KiB