From eb89d4ee5426d86fb3a4d27c2caaab17e708438a Mon Sep 17 00:00:00 2001 From: Paillat Date: Tue, 31 Oct 2023 13:05:47 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(Dockerfile):=20remove=20un?= =?UTF-8?q?used=20TZ=20environment=20variable=20to=20simplify=20Dockerfile?= =?UTF-8?q?=20=F0=9F=90=9B=20fix(ChatProcess.py):=20compare=20message=20co?= =?UTF-8?q?ntent=20instead=20of=20message=20id=20to=20determine=20if=20ori?= =?UTF-8?q?ginal=20message=20should=20be=20added=20to=20messages=20The=20T?= =?UTF-8?q?Z=20environment=20variable=20was=20not=20being=20used=20in=20th?= =?UTF-8?q?e=20Dockerfile,=20so=20it=20was=20removed=20to=20simplify=20the?= =?UTF-8?q?=20file.=20In=20the=20ChatProcess.py=20file,=20the=20comparison?= =?UTF-8?q?=20of=20message=20ids=20was=20replaced=20with=20a=20comparison?= =?UTF-8?q?=20of=20message=20content=20to=20determine=20if=20the=20origina?= =?UTF-8?q?l=20message=20should=20be=20added=20to=20the=20messages=20list.?= =?UTF-8?q?=20This=20ensures=20that=20the=20original=20message=20is=20incl?= =?UTF-8?q?uded=20in=20the=20list=20even=20if=20its=20id=20changes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 1 - src/ChatProcess.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 55222e2..f2b3963 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ ENV PYTHONUNBUFFERED=1 # Turns off pyc files ENV PYTHONDONTWRITEBYTECODE=1 -ENV TZ=Europe/Paris # Install pip requirements WORKDIR /Botator RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /Botator diff --git a/src/ChatProcess.py b/src/ChatProcess.py index bbd16aa..7686912 100644 --- a/src/ChatProcess.py +++ b/src/ChatProcess.py @@ -109,7 +109,7 @@ class Chat: self.message.channel, 10, self.original_message ) # if latst item id is not original message id, add original message to messages - if messages[-1].id != self.original_message.id: + if messages[-1].content != self.original_message.content: messages.append(self.original_message) self.context = [] for msg in messages: