Merge branch '1.0.1'

This commit is contained in:
Morgan McMillian 2019-01-09 20:08:27 -08:00
commit f21e153beb
3 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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)