diff --git a/zerver/views/archive.py b/zerver/views/archive.py index 4516afc1c2..89d7fc0039 100644 --- a/zerver/views/archive.py +++ b/zerver/views/archive.py @@ -1,11 +1,11 @@ -from typing import List +from typing import List, Optional from django.http import HttpRequest, HttpResponse from django.shortcuts import render from django.template import loader from zerver.lib.streams import get_stream_by_id -from zerver.models import Message, get_stream_recipient +from zerver.models import Message, get_stream_recipient, UserProfile from zerver.lib.avatar import get_gravatar_url from zerver.lib.response import json_success from zerver.lib.timestamp import datetime_to_timestamp @@ -52,7 +52,7 @@ def archive(request: HttpRequest, return get_response([], True, stream.name) rendered_message_list = [] - prev_sender = None + prev_sender = None # type: Optional[UserProfile] for msg in all_messages: include_sender = False status_message = Message.is_status_message(msg.content, msg.rendered_content)