Closed gcentauri closed 5 years ago
For generating transaction id's I was thinking of just doing this:
dumb_id(Token) ->
RandString = lists:flatten(io_lib:format("~p", [random:uniform()])),
Hashed = crypto:hash(Token ++ RandString),
base64:encode_to_string(Hashed).
in the matrix
module.
The above may not be a good long term solution. We may want to have the client keep those ids for some reason. I'm just assuming the bot is fine with throwing them away.
that link i posted didn't go where i expected it to. I don't really see a problem with your dumb_id, though it is hard to tell from the example what it is intended to be. The only reason I can think of for the client to hang on to it is if we want it to keep trying to post a message if we don't get some acknowledgement back from the server. 🤷♀
We need a function for the Matrix api to post messages into a given room or rooms
https://matrix.org/docs/spec/client_server/latest#id305
responds with the event id