Giter VIP home page Giter VIP logo

Comments (6)

BenDMyers avatar BenDMyers commented on July 18, 2024

What makes this tricky is, from what I can tell, banning a commenter for their message within Twitch doesn't seem to fire the onMessageDeleted event (or maybe it does and there's an error somewhere?)

Anyways, if there's any way to delete the message when the user is banned, we should do so, as it breaks users' assumption that "deleting" the message will delete it in the overlay view, too.

from showmy.chat.

KenAKAFrosty avatar KenAKAFrosty commented on July 18, 2024

I'll have to see what Comfy exposes to us but I'm fairly sure Twitch's API provides ban events (on mobile currently or I'd check for certain). If we listen for that event and then remove all messages with a matching sender, that should suffice, no?

from showmy.chat.

KenAKAFrosty avatar KenAKAFrosty commented on July 18, 2024

Looked closer at Comfy. I have a hunch we could check onPart event for user metadata, since banning would force them to leave. There may be some sort of boolean flag on the user for 'banned' or similar? Then if so, delete all messages with a matching sender username

from showmy.chat.

BenDMyers avatar BenDMyers commented on July 18, 2024

I think this issue (still open, at time of writing) on the ComfyJS repo could be helpful: instafluff/ComfyJS#23 — it seems like the tmi.js client does expose a 'ban' event, but ComfyJS isn't yet consuming it.

I think maybe the best path forward for this issue could be contributing an onBan hook to ComfyJS that we could leverage here?

from showmy.chat.

KenAKAFrosty avatar KenAKAFrosty commented on July 18, 2024

from showmy.chat.

BenDMyers avatar BenDMyers commented on July 18, 2024

@KenAKAFrosty Would you be able to look into adding the onBan hook upstream in ComfyJS?

from showmy.chat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.