Skip to content
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

Support topics being moved between streams (events) #826

Open
neiljp opened this issue Nov 15, 2020 · 10 comments
Open

Support topics being moved between streams (events) #826

neiljp opened this issue Nov 15, 2020 · 10 comments
Labels
GSoC Possible GSoC project component high priority should be done as soon as possible missing feature: user A missing feature for all users, present in another Zulip client version parity: 3
Milestone

Comments

@neiljp
Copy link
Collaborator

neiljp commented Nov 15, 2020

We support events where messages in streams have their subject/topic renamed (ie. moving to a different topic in the same stream), but as per a recent Zulip release we should support the events which indicate messages have been moved between streams. This event is a variant of an existing one we handle; the code is currently in models.py.

Initially it is most important to support the events properly.

Currently we don't have any particular role-specific actions, ie. nothing that depends upon whether a user is an admin/owner (or even a bot, going the other way), but there is nothing stopping this being supported - but without handling events correctly, the outcome will not be visible in ZT.

Which topics can be moved and between which streams depends entirely on the server capability, which is not within the remit of ZT.

@Laanan I created this issue based on your note in the unrelated #745.

@neiljp neiljp added the enhancement New feature or request label Nov 15, 2020
@Laanan
Copy link

Laanan commented Nov 18, 2020

Thanks @neiljp !

I am diving into the code to see if I can figure out how it works. Good documentation and tutorial in developer-documentation.md -- thanks for that. Can you point me to what I should read in: https://zulip.readthedocs.io/en/latest/subsystems/ to get me up to speed on how subjects/topics get renamed? I'll look forward to joining the chat on #zulip-terminal. 😄

@neiljp
Copy link
Collaborator Author

neiljp commented Nov 18, 2020

The key thing to follow is the get_events call, and how it dispatches to the different _handle_* methods. The expected values in the events should be documented here https://chat.zulip.org/api/get-events

@Laanan
Copy link

Laanan commented Nov 18, 2020 via email

@neiljp
Copy link
Collaborator Author

neiljp commented Nov 19, 2020

I should point out that there is an outstanding aspect which is in progress to improve this area slightly based on the last part of #785.

@Ezio-Sarthak
Copy link
Member

Ezio-Sarthak commented Jan 8, 2021

@neiljp Here are some of my assumptions. Do let me know if I am missing/misleading something:

  • As per the documentation, new_stream_id should be the endpoint passed only if there is a message moved to another stream. If multiple messages are moved, message_ids are returned with ids of messages to be moved.
  • The areas that would require update are: topic narrow, stream narrow, all messages view.
  • The logic in PR Refresh topic list view on update message events #785 should be a good serving tool for required event handlings!

That said, I'm interested to work if @Laanan isn't working right now :)

@Laanan
Copy link

Laanan commented Jan 9, 2021 via email

@Ezio-Sarthak
Copy link
Member

That seems to be a cool integration!

Thanks for letting us know about the current status 👍 I'll dig into it after an affirmation from @neiljp :)

@neiljp
Copy link
Collaborator Author

neiljp commented Jan 20, 2021

@Ezio-Sarthak Did you mean #745 or #785? (the latter is merged fully now.) Regarding what's necessary, there are likely quite a few areas to update in the UI, including eg. the topic list, if it's open, and it may be easier to see a PR. I'd definitely want to see a PR handling the events cleanly first, and we can consider any topic-moving from the ZT UI later (particularly given it's an admin action). I've not checked, but we may need to check based on server feature-level, or otherwise handle event content carefully.

@Ezio-Sarthak
Copy link
Member

Oops, it was a typo there (edited that comment). I meant #785.

Re event handling, I've started mocking some of the code in the merged PR #785, thinking of opening a WIP PR soon :)

@neiljp neiljp added this to the Release after next milestone Jan 28, 2021
@neiljp neiljp changed the title Support topics being moved between streams (events, then UI) Support topics being moved between streams (events) Apr 5, 2021
@neiljp neiljp added missing feature: user A missing feature for all users, present in another Zulip client GSoC Possible GSoC project component high priority should be done as soon as possible and removed enhancement New feature or request labels Apr 5, 2021
@neiljp
Copy link
Collaborator Author

neiljp commented Apr 5, 2021

I just clarified that this is the user-visible feature, ie. when receiving events triggered by other users updating topics.

I've split the UI aspect of this into #983, which is the admin-requiring feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC Possible GSoC project component high priority should be done as soon as possible missing feature: user A missing feature for all users, present in another Zulip client version parity: 3
Projects
None yet
Development

No branches or pull requests

3 participants