-
Notifications
You must be signed in to change notification settings - Fork 178
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
[Feature Request] Add support for Zulip #630
Comments
If the feature is ok, then I would like to work on its implementation. |
Hi @vchrombie, thank you for proposing the inclusion of a new backend. Zulip is a popular oss chat application, I believe that this inclusion will attract more people around grimoirelab, so +1 to your proposal. |
Hi, @valeriocos I think including Zulip as a new backend is a great idea. Also, I have found a lot of organizations using Gitter as a communication channel as well. Do you think we should include that as a backend as well? I would be interested in doing that. I can open a new issue and we can move this discussion there if it interests you :) |
It sounds a good idea @animeshk08 , please open another issue to support gitter and start implementing the backend. Thanks! |
Hi @valeriocos Zulip is more or less like Slack. Each zulip chat server has different streams (like channels in slack) and also each stream has diff topics. I was thinking to target the streams (as parameter) just like how it was done in slack. WDYT? I went through the API docs of Zulip, https://zulipchat.com/api/get-messages. You can use the API to extract the messages from a particular stream. I will be working on this from now and send a draft PR soon. Some of the channels where we can do the testing are |
Hi @vchrombie ! no worries for the delay!
Yes, good idea!
Thanks for the pointer! Have you checked if the
Great, thanks! |
Hi @valeriocos
I checked the docs, https://python.zulipchat.com/api/construct-narrow.
I understand the requirement. I will open an issue and try to pull up discussion on it in the zulip/zulip repository and see if they are interested to introduce such feature. Let's decide based on that. WDYT? |
Yes, totally agree! thanks @vchrombie for pushing this forward |
Hi @valeriocos I opened the issue in the zulip repository but didn't really receive much positive response from them. WDYT? |
Hi @vchrombie ! Ok, sure! Don't hesitate to write if you need any help! |
I started working on it. I have a few questions already.
Click on the ⚙️ >> Settings >> Your bots >> Add a new bot So, the command for fetching messages from the importlib stream in python zulip chat will be like
I just thought of confirming with you.
The Zulip API is a little bit different. https://python.zulipchat.com/api/get-messages
I am not sure how to implement this using payload. I went through StackOverflow and found one solution. You can find it's implementation here, zulip-script.py. Do you have any comments or suggestions for this? |
It should be fine. I understand that we cannot fetch messages with a standard email and user token, right?
We should try to use the library requests, since Perceval provides different mechanisms on top of it (sleep for rate, archiving, etc.). If we go for the use of Since Zulip has a Python client to fetch data from the API, could you check the code of the get_messages method (and related methods)? There, you should find examples of how to use Thanks! |
Hi @valeriocos
Do you mean the user email and token? We can use
Yes, even I was thinking about the same problem.
Yes, Zulip has a Python client which needs to install the zulip pip package. I will try that and let you know. |
Ok, perfect!
Ok, perfect! Thanks |
Hi @valeriocos
Thanks for the help, it really helped.
I understood that all the arguments are handles using requests. In fact a simple request for get_messages boils down to
along with the required headers. Now, I got a basic idea and I will be working on completing this. |
Thanks for the updates @vchrombie |
Hi @valeriocos As I have figured out how to use Zulip API using requests, I was thinking about how to perform the incremental fetch
I tried your suggestion and it worked. I made a small script for it, zulip backend. Initially we can use the
for fetching the first 10 messages. Later, we can use the message id of the latest fetched
to fetch the next set of messages. We can use the Now, I will work on how to integrate this with the perceval backend. Do you have any references where I can find help for this task? |
Hi @vchrombie, thank you for the details. You can check the backend for telegram: https://github.com/chaoss/grimoirelab-perceval/blob/master/perceval/backends/core/telegram.py . It is offset-based and I guess it shouldn't be too different from the one for zulip. |
Adhering to the contributing guidelines (#incubating-repositories), this work is moved to a separate repository [1] and will be maintained over there for some time. [1] Zulip Backend for Perceval: https://github.com/vchrombie/grimoirelab-perceval-zulip Closing this issue. Best, |
How about adding backend support for Zulip?
Zulip is another important chat and collaborative software, just like Rocket.Chat and Slack and it is open-source too.
https://anitab-org.zulipchat.com/
The text was updated successfully, but these errors were encountered: