Skip to content

Approval broken? #117

Description

@flack

When I run the following code:

$user = new midgard_user($lokin_tokens);
$user->login();

$t = new midgard_topic;
$t->create();
$t->approve();
var_dump($t->is_approved());
$t = new midgard_topic($t->id);
var_dump($t->is_approved());
$t->update();
var_dump($t->is_approved());
$t = new midgard_topic($t->id);
var_dump($t->is_approved());

I would expect this output:

bool(true)
bool(true)
bool(false)
bool(false)

instead, I get:

bool(true)
bool(true)
bool(true)
bool(true)

Not sure if I'm missing something here, but shouldn't approval be automatically revoked when the object changes? At least I always thought that is_approved() implicitly checks that metadata.revised <= metadata.approved

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions