Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User credit not recalculated in open chats #20

Open
DarrenWestwood opened this issue Jul 1, 2020 · 1 comment
Open

User credit not recalculated in open chats #20

DarrenWestwood opened this issue Jul 1, 2020 · 1 comment

Comments

@DarrenWestwood
Copy link
Owner

After a bitcoin payment is confirmed, a new conversation has to be started for the user credit to reflect in any open conversations by sending the /start command.

The callback file does not recalculate the user credit in any running/already open conversations.

Solution

Ensure user.recalculate_credit() is called for the appropriate user during Blockonomics callbacks.

An example of similar functionality is manually adding transactions to a specific user from the admin menu:
https://github.com/DarrenWestwood/greed/blob/master/worker.py#L1205

@bitcoin4cashqc
Copy link

I fixed this way adding self.user.recalculate_credit() and self.session.commit() in worker.py line 478, maybe it's not the best but it does the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants