Twig user.roles.0 stopped working

I’ve been using the email editor a twig check user.roles.0 == 'wholesale' but now it stopped working with the latest bricksforge updates. Can you please let me know what is the new way to check for the user role now?

in the database the role is stored with meta_key 'wp_capabilities' for example like this: a:1:{s:9:"wholesale";b:1;}