Module: Teems::Commands::ActivityFormatting

Included in:
Activity
Defined in:
lib/teems/commands/activity.rb

Overview

Format activity feed notifications for display

Constant Summary collapse

ACTIVITY_DESCRIPTIONS =
{
  %w[msGraph privateMeetingCanceled] => 'canceled',
  %w[msGraph privateMeetingCreated] => 'invited you',
  %w[msGraph privateMeetingUpdated] => 'updated',
  %w[msGraph privateMeetingForwarded] => 'forwarded you',
  %w[msGraph delegateMeetingCreated] => 'invited you',
  %w[msGraph delegateMeetingUpdated] => 'updated',
  %w[mentionInChat person] => 'mentioned you',
  %w[mentionInChat everyone] => 'mentioned Everyone',
  %w[mention channel] => 'mentioned channel',
  %w[reactionInChat] => 'reacted'
}.freeze
START_DATETIME_PATTERN =
%r{<StartDateTime>(.+?)</StartDateTime>}
END_DATETIME_PATTERN =
%r{<EndDateTime>(.+?)</EndDateTime>}
MAX_PREVIEW =
120