trying to fix initial messages loading

This commit is contained in:
bakatrouble 2019-01-30 23:20:30 +03:00
parent d059b12e5e
commit 148fc0afae

View File

@ -11,14 +11,14 @@ from pyrogram import Chat as PyrogramChat, Message as PyrogramMessage
class AggregationSource(models.Model):
owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=64)
chat_id = models.CharField(db_index=True, max_length=64)
chat_id = models.BigIntegerField(db_index=True)
def __str__(self):
return self.title
class Chat(models.Model):
chat_id = models.CharField(db_index=True, max_length=64)
chat_id = models.BigIntegerField(db_index=True)
title = models.TextField()
username = models.CharField(max_length=64, null=True, blank=True)
photo = models.ImageField(null=True, blank=True)