adityadroid/Messio

update failed

Closed this issue · 1 comments

Could you help me on this stage :

Update failed when i try to update 'latestMessage' fields.

ChatProvider Line72

    await chatDocRef.updateData({'latestMessage': message.toMap()});

I tried with your project (pull 22 and 23) as well, and I have the same behavior.

Comment this line, has not a big effect too, because UI is strange : no ChatAppBar, no messages list in UI
Screenshot_1572691913

sendMessage works because data is stored, but that's all.

Any idea ? thanks in advance

After investing a lot on this issue, i found it finally.

Creation user stage is important.
If a user already exist exception is fired, chat is not created properly.
So db should be in a clean state.