diff --git a/CHANGELOG.md b/CHANGELOG.md index 76397f1..fead47f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.0.1] - 2019-01-09 +### Fixed +- mentions from pnut to matrix +- startup for pnut-matrix-bot + ## [1.0.0] - 2019-01-03 ### Fixed - database initialization @@ -25,5 +30,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. keeping track of releases for this project. :p [Unreleased]: https://gitlab.dreamfall.space/thrrgilag/pnut-matrix/compare/1.0.0...HEAD +[1.0.1]: https://gitlab.dreamfall.space/thrrgilag/pnut-matrix/tags/1.0.1 [1.0.0]: https://gitlab.dreamfall.space/thrrgilag/pnut-matrix/tags/1.0.0 [0.0.1]: https://gitlab.dreamfall.space/thrrgilag/pnut-matrix/tags/v0.0.1 diff --git a/appservice.py b/appservice.py index 46fc05a..e766e8a 100644 --- a/appservice.py +++ b/appservice.py @@ -130,7 +130,6 @@ def new_message(event, user): else: token = app.config['MATRIX_PNUT_TOKEN'] prefix = "[" + get_displayname(event['user_id']) + "] (" + event['user_id'] + ")\n" - prefix = prefix.replace('@', '@\v') pnutpy.api.add_authorization_token(token) text = None diff --git a/pnut-matrix-bot.py b/pnut-matrix-bot.py index 9d58f52..9aba796 100644 --- a/pnut-matrix-bot.py +++ b/pnut-matrix-bot.py @@ -63,7 +63,7 @@ def save_cb(room, event): def drop_cb(room, event): try: - user = Users.query.filter(Users.matrix_id=event['sender']).one_or_none() + user = Users.query.filter(Users.matrix_id == event['sender']).one_or_none() if user is not None: db_session.delete(user) db_session.commit() @@ -79,7 +79,7 @@ def drop_cb(room, event): def status_cb(room, event): try: - user = Users.query.filter(Users.matrix_id=event['sender']).one_or_none() + user = Users.query.filter(Users.matrix_id == event['sender']).one_or_none() if user is None: reply = "You are currently not authorized on pnut.io" else: @@ -99,7 +99,7 @@ def status_cb(room, event): if __name__ == "__main__": - logging.basicConfig(level=logging.DEBUG) + logging.basicConfig(level=logging.INFO) with open("config.yaml", "rb") as config_file: config = yaml.load(config_file)