Add a log indicating when a reaction was added to a story

This commit is contained in:
Josh Perez 2022-08-15 14:47:45 -04:00 committed by GitHub
parent 7399086939
commit 385eb63fd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import * as log from '../logging/log';
import { getContactId, getContact } from '../messages/helpers';
import { isDirectConversation, isMe } from '../util/whatTypeOfConversation';
import { isOutgoing, isStory } from '../state/selectors/message';
import { getMessageIdForLogging } from '../util/idForLogging';
export class ReactionModel extends Model<ReactionAttributesType> {}
@ -187,6 +188,15 @@ export class Reactions extends Collection<ReactionModel> {
generatedMessage.hydrateStoryContext(message),
]);
log.info('Reactions.onReaction adding reaction to story', {
reactionMessageId: getMessageIdForLogging(
generatedMessage.attributes
),
storyId: getMessageIdForLogging(targetMessage),
targetTimestamp: reaction.get('targetTimestamp'),
timestamp: reaction.get('timestamp'),
});
generatedMessage.set({ id: generatedMessageId });
const messageToAdd = window.MessageController.register(