Add Idempotency Key to the pleroma:chat_update streaming event payload
Context pleroma-fe#948 (comment 72332), pleroma-fe!1228 (merged)
For optimistic / nonblocking posting in chat, it would be useful to have the Idempotency Key (or something similar, e.g., client_message_id
) in the pleroma:chat_update
event payload.
The reason is that the streaming event arrives earlier than the POST /api/v1/pleroma/chats/:id/messages
response, and without the idempotency key (or a similar identifier) it's difficult to tell for sure if the event belongs to the message that FE has just posted or it should be handled as a different message.