rockneurotiko/ex_gram

Save all outgoing messages from bot.

Opened this issue · 1 comments

prtngn commented

I need all outgoing messages to be saved in the database. How can this be implemented with minimal costs?

That's a good question, and a use case that I haven't thought yet.

I think that the best way to handle this would be to improve #97 and add a telemetry message on executed methods.

It would be somewhere near here: https://github.com/rockneurotiko/ex_gram/blob/master/lib/ex_gram/macros/executer.ex#L48 and it would send a telemetry event like [:ex_gram, :method, :executed] with at least the method, body and result in the metadata