Reactions: isSentByConversationId is only for reactions from this device
This commit is contained in:
@@ -3334,18 +3334,6 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const newReaction: MessageReactionType = {
|
|
||||||
emoji: reaction.get('remove') ? undefined : reaction.get('emoji'),
|
|
||||||
fromId: reaction.get('fromId'),
|
|
||||||
targetAuthorUuid: reaction.get('targetAuthorUuid'),
|
|
||||||
targetTimestamp: reaction.get('targetTimestamp'),
|
|
||||||
timestamp: reaction.get('timestamp'),
|
|
||||||
isSentByConversationId: zipObject(
|
|
||||||
conversation.getMemberConversationIds(),
|
|
||||||
repeat(false)
|
|
||||||
),
|
|
||||||
};
|
|
||||||
|
|
||||||
const isFromThisDevice =
|
const isFromThisDevice =
|
||||||
reaction.get('source') === ReactionSource.FromThisDevice;
|
reaction.get('source') === ReactionSource.FromThisDevice;
|
||||||
const isFromSync = reaction.get('source') === ReactionSource.FromSync;
|
const isFromSync = reaction.get('source') === ReactionSource.FromSync;
|
||||||
@@ -3356,6 +3344,17 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||||||
'Reaction can only be from this device, from sync, or from someone else'
|
'Reaction can only be from this device, from sync, or from someone else'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const newReaction: MessageReactionType = {
|
||||||
|
emoji: reaction.get('remove') ? undefined : reaction.get('emoji'),
|
||||||
|
fromId: reaction.get('fromId'),
|
||||||
|
targetAuthorUuid: reaction.get('targetAuthorUuid'),
|
||||||
|
targetTimestamp: reaction.get('targetTimestamp'),
|
||||||
|
timestamp: reaction.get('timestamp'),
|
||||||
|
isSentByConversationId: isFromThisDevice
|
||||||
|
? zipObject(conversation.getMemberConversationIds(), repeat(false))
|
||||||
|
: undefined,
|
||||||
|
};
|
||||||
|
|
||||||
// Reactions to stories are saved as separate messages, and so require a totally
|
// Reactions to stories are saved as separate messages, and so require a totally
|
||||||
// different codepath.
|
// different codepath.
|
||||||
if (storyMessage) {
|
if (storyMessage) {
|
||||||
|
@@ -232,6 +232,7 @@ export default class WebSocketResource extends EventTarget {
|
|||||||
|
|
||||||
public close(code = 3000, reason?: string): void {
|
public close(code = 3000, reason?: string): void {
|
||||||
if (this.closed) {
|
if (this.closed) {
|
||||||
|
log.info(`WebSocketResource.close: Already closed! ${code}/${reason}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user