PowerlineApp / powerline-rn

GNU Affero General Public License v3.0
0 stars 6 forks source link

Release A - Critical Bug - Posts Remaining Counter #229

Closed jterps08 closed 6 years ago

jterps08 commented 6 years ago

image

Why does this say -5? If user has 0 remaining, s/he should not be allowed to create item in that group.

igaponov commented 6 years ago
$ http GET https://api-dev.powerli.ne/api/v2/groups/1/micro-petitions-config "Token: $ABC_TOKEN" 
HTTP/1.1 200 OK
...

{
    "petition_duration": null, 
    "petition_per_month": 5, 
    "petition_percent": null, 
    "petitions_remaining": 5, 
    "posts_remaining": 5
}
piubellofelipe commented 6 years ago

this is a frontend problem. how should the app handle it? make the "send" button and the textinput not working when the user exceeded his posts/petition ?

jterps08 commented 6 years ago

@piubellofelipe Just make the send button create an alert "You've exceeded the number of allowed posts this month in this group." In the future, we may allow user to upgrade to bypass limits or only allow Verified users to bypass limits.

piubellofelipe commented 6 years ago

ok, I'll make the fix. thanks