fix: Bug - Video attachment on android gets sent in the message bubble above with no preview image
This commit is contained in:
@@ -50,8 +50,15 @@ export const MessagesActions = createActionGroup({
|
||||
}>(),
|
||||
'Load Older Messages Failure': props<{ error: string }>(),
|
||||
|
||||
/** Sends a new chat message to the current room and broadcasts to peers. */
|
||||
'Send Message': props<{ content: string; replyToId?: string; channelId?: string }>(),
|
||||
/**
|
||||
* Sends a new chat message to the current room and broadcasts to peers.
|
||||
*
|
||||
* An optional `id` lets the caller pre-allocate the message id so it can
|
||||
* bind attachments to the exact message it created, instead of guessing
|
||||
* by matching content after the fact (which mis-attaches caption-less
|
||||
* media to a sibling message - see the attachment-only media bug).
|
||||
*/
|
||||
'Send Message': props<{ id?: string; content: string; replyToId?: string; channelId?: string }>(),
|
||||
'Send Message Success': props<{ message: Message }>(),
|
||||
'Send Message Failure': props<{ error: string }>(),
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ export class MessagesEffects {
|
||||
this.store.select(selectCurrentRoom)
|
||||
),
|
||||
mergeMap(([
|
||||
{ content, replyToId, channelId },
|
||||
{ id, content, replyToId, channelId },
|
||||
currentUser,
|
||||
currentRoom
|
||||
]) => {
|
||||
@@ -239,7 +239,7 @@ export class MessagesEffects {
|
||||
}
|
||||
|
||||
const draftMessage: Message = {
|
||||
id: uuidv4(),
|
||||
id: id ?? uuidv4(),
|
||||
roomId: currentRoom.id,
|
||||
channelId: channelId || 'general',
|
||||
senderId: currentUser.id,
|
||||
|
||||
Reference in New Issue
Block a user