1
0
mirror of https://github.com/gryf/slack-backup.git synced 2025-12-17 11:30:25 +01:00

Small fixes, version bump, alpha stage, added emoji map.

This commit is contained in:
2016-11-26 17:55:33 +01:00
parent 832b76fc84
commit c79d8ae0e1
6 changed files with 1914 additions and 32 deletions

View File

@@ -146,10 +146,17 @@ class Client(object):
Create message with corresponding possible metadata, like reactions,
files etc.
"""
message = o.Message(data)
message.user = self.q(o.User).\
user = self.q(o.User).\
filter(o.User.slackid == data['user']).one()
if data['type'] == 'message' and not data['text'].strip():
logging.info("Skipping message from `%s' since it's empty",
user.name)
return
message = o.Message(data)
message.channel = channel
message.user = user
if data.get('is_starred'):
message.is_starred = True