fincubator / tellerbot

Telegram Bot for over-the-counter trading
https://t.me/TellerBot
GNU Affero General Public License v3.0
23 stars 10 forks source link

Order editing #4

Closed r4rdsn closed 5 years ago

r4rdsn commented 5 years ago

Add the ability to edit existing orders. Probably starting with the button on user's own order (above "Delete").

r4rdsn commented 5 years ago

Idea for editing interface: to use the switch_inline_query_current_chat argument on "Edit" button.

Example

Suppose I have an order like this:

@r4rdsn buys BTC for RUB

Transaction sum: 5000.00 RUB
Price: 272000.00 RUB

When I press on "Edit", it can fill my input field in the current chat with the bot's username (which is unchangable in API) and then the string which has all editable data of the order, like that:

@bailsbot BTC:RUB:5000:RUB:272000

What I have to do is just to edit this string directly in my input field and send it back to the bot, which will then validate this string (e.g. by counting colons), and if it is correct, replace existing information with the sent one.

r4rdsn commented 5 years ago

Order editing added in a3f186b