File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2136,8 +2136,17 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
21362136 case ChannelNarrow (: final streamId):
21372137 case TopicNarrow (: final streamId):
21382138 final channel = store.streams[streamId];
2139- if (channel == null || ! store.selfCanSendMessage (inChannel: channel,
2140- byDate: DateTime .now ())) {
2139+ if (channel == null ) {
2140+ return _Banner (
2141+ intent: _BannerIntent .info,
2142+ // TODO this doesn't seem like exactly the right message --
2143+ // it makes it sound like the channel exists, which might not be
2144+ // true. (We'll get here if the channel doesn't exist or if it
2145+ // exists but we don't have permission to know about it.)
2146+ label: zulipLocalizations.errorBannerCannotPostInChannelLabel);
2147+ }
2148+
2149+ if (! store.selfCanSendMessage (inChannel: channel, byDate: DateTime .now ())) {
21412150 return _Banner (
21422151 intent: _BannerIntent .info,
21432152 label: zulipLocalizations.errorBannerCannotPostInChannelLabel);
You can’t perform that action at this time.
0 commit comments