open-source-ideas / ideas

💡 Looking for inspiration for your next open source project? Or perhaps you've got a brilliant idea you can't wait to share with others? Open Source Ideas is a community built specifically for this! 👋
6.56k stars 221 forks source link

Common API for various chats #139

Closed Kreijstal closed 5 years ago

Kreijstal commented 5 years ago

Project description

[Describe the project the best you can. Give any background information or link to resources that are necessary to understand the problem it is intended to solve. The more you elaborate on your idea, the easier it is to accomplish.]

In essence something like smooch.io but open source, you can have a common API to different chats and platforms (WhatsApp, Discord, fb messenger, irc, slack, telegram, etc...)

The chats are basically stream of messages. You are allowed to go back and read the history programatically, but in most cases you don't need to store the history itself (except when it is IRC or the like) You would need to provide your account credentials/API key (both should work). And a chat would be the instantiation of some "Chat" object, you can do things like:

These objects have stream events which you can listen to, for when someone replies, types, starts typing, etc. Conversations shouldn't be treated differently as group chats, although in many applications they have different permissions the channels would also have flags, if they allow to embed images, if they allow to embed files, the size limit, if they allow color, if they allow markdown, etc. these probably inherit the properties from the chats. You can also have extra features, if there are some rules in a channel, you can assign parameters to individual channels, like max_number_of_messages_in_a_row, etc.

Relevant Technology

[Write what technology is relevant. What language, what platform, any particular library/framework/existing project it is based on?]

I'm sure one can find a library of any project one desires now, so it would be just matter of translating api calls

Complexity and required time

[Please only tick off one box in each category by changing [ ] to [x]. The labels on the project will then be updated by the maintainers as soon as possible.]

Complexity

Required time (ETA)

sbarfurth commented 5 years ago

What exactly should interaction with the API look like? What would be the setup process?

KOLANICH commented 5 years ago

something like pidgin, miranda-ng, konversations and other multinetwork IM clients?

sbarfurth commented 5 years ago

Pidgin doesn't really have "modern" integrations. @Kreijstal How would this API work exactly?

KOLANICH commented 5 years ago

Pidgin doesn't really have "modern" integrations.

https://github.com/majn/telegram-purple https://github.com/davidgfnet/whatsapp-purple/ https://github.com/sbwtw/pidgin-wechat https://github.com/jin-eld/tox-prpl https://github.com/anpetrov/python-purple

remram44 commented 5 years ago

This seems to be either Pidgin (program, and libpurple, library) or Matrix (protocol and network). So I would say it's already there, and while those can certainly be improved, there is no need to start a new open-source project...

Kreijstal commented 5 years ago

let me design a mock api

Kreijstal commented 5 years ago

This seems to be either Pidgin (program, and libpurple, library) or Matrix (protocol and network). So I would say it's already there, and while those can certainly be improved, there is no need to start a new open-source project...

I think you are right, before this I didn't know about these multinetwork im clients, and the need seems to be fulfilled for now.