-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abstract Chat Method #27
Comments
Maybe a class structure like this?
Seems to make sense to me for a rough structure. Not sure what other functionality is needed. Some presence stuff probably. |
I almost want to make the messages just pure dictionary, and not even class-ify them. Sleek already kinda does that, so it might be beneficial to just leave them as is, that way modules can poke around in case there is something specific that's not covered (XMPP for example has a lot of extra crap that can be put into their stanzas, and just directly copying that over makes API writing minimal). Secondly, sending is I think handled similarly between IRC and XMPP, so it might almost make sense to just have one This is where the abitrary storing of data into the message dicts might come in handy, since module writers can look for something like Does any of this make sense? I've been thinking about it mostly in the shower, and haven't really formalized any thoughts yet. |
The only thing I would have against the arbitrary dictionary is that the assurance of where things are is lost, and therefore modules may have to do different things for different protocols, adding more complexity to the modules themselves. I understand the point that there is more information from some protocols and less from others, so perhaps there could be a dictionary called I agree that there really should be one Also, I feel like having a type on the room object and then a room on the message is more sensible than just having a room-type on the message. |
Major change, will also result in a major API revision.
Abstract away the method of chat, so that XMPP, IRC, etc can all be handled the same way.
The text was updated successfully, but these errors were encountered: