feat: Add reply functionality to chatroom and update HTTP client for …
Refactor message handling and add ReplyMetaData extraction
- Added
reply_metadatafunction to extractReplyMetaDatafrom aMessage. - Updated type definitions in
kick/types/message.pyto ensure consistency. - Fixed import issues by correctly importing the
MessagePayloadtype. - Fixed ws app client id now it looks like
wss://ws-us2.pusher.com/app/32cbd69e4b950bf97679?protocol=7&client=js&version=8.4.0-rc2&flash=false…V2 API - Also send message now using v2 api and added reply functionality to chat
- Fix for "App\Events\ChatMessageEvent" probably currently it is not using "livestream" key any more
This commit ensures that reply messages can be properly handled and their metadata extracted for further processing.
Hello, and thank you for this!
Is there a specific reason you opted for Chatroom.reply, with Message.reply_metadata instead of just implementing Message.reply?
If not, I'd like you to move to using Message.reply instead of Chatroom.reply, with Message.reply_metadata.
Hello, and thank you for this!
Is there a specific reason you opted for
Chatroom.reply, withMessage.reply_metadatainstead of just implementingMessage.reply?If not, I'd like you to move to using
Message.replyinstead ofChatroom.reply, withMessage.reply_metadata.
in my opinion Message was just a representation class of the message from ws and Chatroom otherwise was a class who handle api communication, thats why i choose Chatroom but if you disagree i could move it to Message
in my opinion Message was just a representation class of the message from ws and Chatroom otherwise was a class who handle api communication, thats why i choose Chatroom but if you disagree i could move it to Message
Message is a model from kick's API, however it inherits from HTTPDataclass, so you can access the http client via Message.http.
Message.http exists because of Message.author.to_user
in my opinion Message was just a representation class of the message from ws and Chatroom otherwise was a class who handle api communication, thats why i choose Chatroom but if you disagree i could move it to Message
Messageis a model from kick's API, however it inherits fromHTTPDataclass, so you can access the http client viaMessage.http. *Message.httpexists because ofMessage.author.to_user
agree i'll come later with fixes