• Daniel García Moreno's avatar
    api: Use md5 as unique message id instead of i32 · 8d5e98f2
    Daniel García Moreno authored
    We were using an integer for the message id when we were sending a
    message. This id was incremented with each message sent.
    
    Reading the matrix server documentation I've discovered that this id
    should be unique:
    
    > Clients should generate an ID unique across requests with the same
    > access token; it will be used by the server to ensure idempotency of
    > requests.
    
    So this was a problem. I think that this is because some messages never
    got sent to the server and we don't get any error back.
    
    To fix that now we generate an unique id for each message using the room
    id, the message body and the message date, we concatenate that and make
    an md5 sum, so this should be unique.
    
    https://matrix.org/docs/spec/client_server/r0.3.0.html#put-matrix-client-r0-rooms-roomid-send-eventtype-txnid
    
    See #201
    8d5e98f2
Name
Last commit
Last update
.gitlab/issue_templates Loading commit data...
flatpak Loading commit data...
fractal-api Loading commit data...
fractal-gtk Loading commit data...
screenshots Loading commit data...
scripts Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
Cargo.lock Loading commit data...
Cargo.toml Loading commit data...
LICENSE.txt Loading commit data...
README.md Loading commit data...
TODO Loading commit data...
fractal.doap Loading commit data...
logo.png Loading commit data...
meson.build Loading commit data...