mypy: Fix Optional typing in do_update_message_flags.
mypy: Fix Optional typing in do_update_message_flags.

Fixes #5746.

dhcrzf/zulip,dhcrzf/zulip,showell/zulip,hackerkid/zulip,zulip/zulip,zulip/zulip,tommyip/zulip,vabs22/zulip,eeshangarg/zulip,zulip/zulip,timabbott/zulip,jackrzhang/zulip,tommyip/zulip,shubhamdhama/zulip,kou/zulip,brainwane/zulip,rht/zulip,rht/zulip,mahim97/zulip,brockwhittaker/zulip,brockwhittaker/zulip,amanharitsh123/zulip,synicalsyntax/zulip,vabs22/zulip,mahim97/zulip,Galexrt/zulip,jackrzhang/zulip,Galexrt/zulip,shubhamdhama/zulip,shubhamdhama/zulip,shubhamdhama/zulip,andersk/zulip,showell/zulip,synicalsyntax/zulip,andersk/zulip,kou/zulip,amanharitsh123/zulip,vaidap/zulip,mahim97/zulip,eeshangarg/zulip,zulip/zulip,punchagan/zulip,jackrzhang/zulip,brockwhittaker/zulip,timabbott/zulip,timabbott/zulip,brockwhittaker/zulip,mahim97/zulip,showell/zulip,verma-varsha/zulip,synicalsyntax/zulip,Galexrt/zulip,zulip/zulip,synicalsyntax/zulip,vaidap/zulip,synicalsyntax/zulip,rishig/zulip,rht/zulip,hackerkid/zulip,dhcrzf/zulip,verma-varsha/zulip,dhcrzf/zulip,punchagan/zulip,andersk/zulip,synicalsyntax/zulip,tommyip/zulip,tommyip/zulip,rht/zulip,eeshangarg/zulip,Galexrt/zulip,punchagan/zulip,showell/zulip,brockwhittaker/zulip,brainwane/zulip,dhcrzf/zulip,hackerkid/zulip,amanharitsh123/zulip,eeshangarg/zulip,timabbott/zulip,mahim97/zulip,hackerkid/zulip,showell/zulip,jackrzhang/zulip,vabs22/zulip,shubhamdhama/zulip,dhcrzf/zulip,verma-varsha/zulip,timabbott/zulip,amanharitsh123/zulip,dhcrzf/zulip,rishig/zulip,vaidap/zulip,verma-varsha/zulip,tommyip/zulip,rht/zulip,amanharitsh123/zulip,kou/zulip,hackerkid/zulip,punchagan/zulip,verma-varsha/zulip,Galexrt/zulip,kou/zulip,andersk/zulip,brainwane/zulip,brainwane/zulip,showell/zulip,rishig/zulip,eeshangarg/zulip,timabbott/zulip,mahim97/zulip,eeshangarg/zulip,andersk/zulip,timabbott/zulip,jackrzhang/zulip,vaidap/zulip,rht/zulip,brockwhittaker/zulip,verma-varsha/zulip,kou/zulip,vabs22/zulip,vaidap/zulip,rht/zulip,rishig/zulip,vaidap/zulip,jackrzhang/zulip,synicalsyntax/zulip,Galexrt/zulip,kou/zulip,rishig/zulip,jackrzhang/zulip,eeshangarg/zulip,amanharitsh123/zulip,punchagan/zulip,zulip/zulip,brainwane/zulip,brainwane/zulip,showell/zulip,vabs22/zulip,tommyip/zulip,hackerkid/zulip,Galexrt/zulip,punchagan/zulip,shubhamdhama/zulip,brainwane/zulip,shubhamdhama/zulip,vabs22/zulip,zulip/zulip,andersk/zulip,rishig/zulip,hackerkid/zulip,tommyip/zulip,punchagan/zulip,andersk/zulip,kou/zulip,rishig/zulip