This commit is contained in:
retoor 2025-06-15 02:30:57 +02:00
parent 4a6bba7734
commit fd5d1c3401
2 changed files with 6 additions and 5 deletions
src/snek

View File

@ -146,7 +146,7 @@ class ChatInputComponent extends NjetComponent {
this.user = user;
});
this.liveType = this.getAttribute("live-type") === "true";
this.liveType = this.getAttribute("live-type") !== "true";
this.liveTypeInterval = parseInt(this.getAttribute("live-type-interval")) || 6;
this.channelUid = this.getAttribute("channel");

View File

@ -270,10 +270,11 @@ class RPCView(BaseView):
async def send_message(self, channel_uid, message, is_final=True):
self._require_login()
if not is_final:
check_message = await self.services.channel_message.get(channel_uid=channel_uid, user_uid=self.user_uid,is_final=False)
if check_message:
return await self.update_message_text(check_message["uid"], message)
#if not is_final:
# check_message = await self.services.channel_message.get(channel_uid=channel_uid, user_uid=self.user_uid,is_final=False)
# if check_message:
# return await self.update_message_text(check_message["uid"], message)
is_final = True
message = await self.services.chat.send(
self.user_uid, channel_uid, message, is_final
)