Skip to content

Commit

Permalink
Add a log indicating when a reaction was added to a story
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-signal committed Aug 15, 2022
1 parent 7399086 commit 385eb63
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ts/messageModifiers/Reactions.ts
Expand Up @@ -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> {}

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 385eb63

Please sign in to comment.