mirror of
https://github.com/stake-house/poap-reddit-bot.git
synced 2026-01-09 14:07:58 -05:00
removed lowercasing of usernames
This commit is contained in:
1
app.py
1
app.py
@@ -106,7 +106,6 @@ async def upload_claims(request: Request, event_id: str, file: UploadFile = File
|
||||
df['username'] = ''
|
||||
|
||||
df = df.fillna('')
|
||||
df['username'] = df['username'].apply(lambda x: x.lower())
|
||||
|
||||
existing_claims = await Claim.objects.filter(event__id__exact=event_id).all()
|
||||
existing_links = {c.link:c for c in existing_claims}
|
||||
|
||||
@@ -15,7 +15,7 @@ class RedditBot:
|
||||
self.client = client
|
||||
|
||||
async def message_handler(self, message: Message):
|
||||
username = message.author.name.lower() if message.author else None
|
||||
username = message.author.name if message.author else None
|
||||
code = message.body.split(' ')[0].lower()
|
||||
|
||||
if code == 'ping':
|
||||
@@ -76,7 +76,7 @@ class RedditBot:
|
||||
logger.debug(f'Received request from {username} with invalid code {code}')
|
||||
|
||||
await message.mark_read()
|
||||
response_message = ResponseMessage(secondary_id=comment.id, username=comment.author.name.lower(), created=comment.created_utc, body=comment.body, claim=claim)
|
||||
response_message = ResponseMessage(secondary_id=comment.id, username=comment.author.name, created=comment.created_utc, body=comment.body, claim=claim)
|
||||
await response_message.save()
|
||||
|
||||
async def run(self):
|
||||
|
||||
Reference in New Issue
Block a user