"Start a new DM" in sidebar for users who cannot use DMs

Is it possible to also hide the line that would usually separate the DM section from the channel section?

When the user isn’t allowed to chat at all, there is no line below the tag section. But when they are allowed to chat, but not to use DM chats, then there is a line below the Channel section.