def METHOD_NAME(
    self, slack_team_identity: SlackTeamIdentity, alert_group: AlertGroup, payload: EventPayload
) -> None:
    """
    There's a possibility that OnCall failed to create a SlackMessage instance for an AlertGroup, but the message
    was sent to Slack. This method creates SlackMessage instance for such orphaned messages.
    """
    channel_id = payload["channel"]["id"]
    try:
        message_id = payload["message"]["ts"]
    except KeyError:
        message_id = payload["original_message"]["ts"]
    SlackMessage.objects.create(
        slack_id=message_id,
        organization=alert_group.channel.organization,
        _slack_team_identity=slack_team_identity,
        channel_id=channel_id,
        alert_group=alert_group,
    )