stream-chat-android
stream-chat-android copied to clipboard
Message cooldown not in sync with the BE in certain cases
Context & proposal
Steps to reproduce:
- Find a channel with a cooldown period
- Send a message with an attachment
- Reply to the message immediately after the cooldown ends
Result:
Message fails to send in both apps with the following printed out in the logs in UI Components:
E/Chat:MessageInputViewModel: Could not send message with cid: messaging:6da0a78b-8880-44cc-867b-9d9a448c80aa. Error message: Status code: 403, with stream code: 60, description: SendMessage failed with error: "user jc is not allowed to send messages on channel messaging:6da0a78b-8880-44cc-867b-9d9a448c80aa under cool down period(10s)". Cause message: null
Acceptance criteria
To accept this task we need to complete the following items:
- [ ] Locate the issue and sync with the BE team if needed.
- [ ] Fix the issue.
Also, some user roles should be able to bypass the cooldown (e.g. admins). I suppose there should be a channel capability for that.