From c9be0256e446534311f1eb3dae1f1f6acfda7a15 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Tue, 8 Jan 2019 22:01:00 -0800 Subject: [PATCH 1/3] remove vertical tab insert in mentions issue #36 --- appservice.py | 1 - 1 file changed, 1 deletion(-) 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 From a95c3df51a917ba9f1c999ecd7014b4662910f5f Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Tue, 8 Jan 2019 22:03:17 -0800 Subject: [PATCH 2/3] fix syntax error in user lookups issue #37 --- pnut-matrix-bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) From 6818993ff76cea6a9b6bc2e01d48bb0a179de8a0 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Wed, 9 Jan 2019 20:02:03 -0800 Subject: [PATCH 3/3] changelog updaet --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) 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