Skip to content

Conversation

@gmoelter
Copy link

@gmoelter gmoelter commented Jan 9, 2026

Setting of self.msg_id from config should not depend on the argument clean being True.

Setting of `self.msg_id` from `config` should not depend on the argument `clean` being True.
@gmoelter
Copy link
Author

gmoelter commented Jan 9, 2026

Maybe one should even go further and account for the possibility that unidecode has to be applied to the custom msg_id.

Hence, I would suggest the following:

            if self.clean:
                from text_unidecode import unidecode

                self._config['name'] = unidecode(self._config['name'])[:70]

                if self._config.get('msg_id'):
                    self._config['msg_id'] = unidecode(self._config['msg_id'])

            if self._config.get('msg_id'):
                self.msg_id = self._config['msg_id'][:35]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant