Merge branch '1.0.1'
This commit is contained in:
commit
f21e153beb
3 changed files with 9 additions and 4 deletions
|
@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.0.1] - 2019-01-09
|
||||||
|
### Fixed
|
||||||
|
- mentions from pnut to matrix
|
||||||
|
- startup for pnut-matrix-bot
|
||||||
|
|
||||||
## [1.0.0] - 2019-01-03
|
## [1.0.0] - 2019-01-03
|
||||||
### Fixed
|
### Fixed
|
||||||
- database initialization
|
- 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
|
keeping track of releases for this project. :p
|
||||||
|
|
||||||
[Unreleased]: https://gitlab.dreamfall.space/thrrgilag/pnut-matrix/compare/1.0.0...HEAD
|
[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
|
[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
|
[0.0.1]: https://gitlab.dreamfall.space/thrrgilag/pnut-matrix/tags/v0.0.1
|
||||||
|
|
|
@ -130,7 +130,6 @@ def new_message(event, user):
|
||||||
else:
|
else:
|
||||||
token = app.config['MATRIX_PNUT_TOKEN']
|
token = app.config['MATRIX_PNUT_TOKEN']
|
||||||
prefix = "[" + get_displayname(event['user_id']) + "] (" + event['user_id'] + ")\n"
|
prefix = "[" + get_displayname(event['user_id']) + "] (" + event['user_id'] + ")\n"
|
||||||
prefix = prefix.replace('@', '@\v')
|
|
||||||
|
|
||||||
pnutpy.api.add_authorization_token(token)
|
pnutpy.api.add_authorization_token(token)
|
||||||
text = None
|
text = None
|
||||||
|
|
|
@ -63,7 +63,7 @@ def save_cb(room, event):
|
||||||
|
|
||||||
def drop_cb(room, event):
|
def drop_cb(room, event):
|
||||||
try:
|
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:
|
if user is not None:
|
||||||
db_session.delete(user)
|
db_session.delete(user)
|
||||||
db_session.commit()
|
db_session.commit()
|
||||||
|
@ -79,7 +79,7 @@ def drop_cb(room, event):
|
||||||
|
|
||||||
def status_cb(room, event):
|
def status_cb(room, event):
|
||||||
try:
|
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:
|
if user is None:
|
||||||
reply = "You are currently not authorized on pnut.io"
|
reply = "You are currently not authorized on pnut.io"
|
||||||
else:
|
else:
|
||||||
|
@ -99,7 +99,7 @@ def status_cb(room, event):
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
with open("config.yaml", "rb") as config_file:
|
with open("config.yaml", "rb") as config_file:
|
||||||
config = yaml.load(config_file)
|
config = yaml.load(config_file)
|
||||||
|
|
Loading…
Reference in a new issue