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

Opens message links popup menu #424

Closed
wants to merge 1 commit into from

Conversation

shreyamalviya
Copy link
Collaborator

As of now, this does the following:

  • Opens menu with links on pressing v
  • Narrows to a stream (but does nothing if not subscribed to stream)
  • Narrows to PM with a user (has an issue for users with whom no previous private conversation has taken place)

Final functionality includes:
Pressing enter on one of the buttons in the links popup menu does one of the following, depending on the link:
* narrow to stream
* narrow to user
* open image in system's default viewer
* open link in system's default browser

@zulipbot zulipbot added the size: XL [Automatic label added by zulipbot] label Jul 9, 2019
os.mkdir(img_dir_path)
except FileExistsError:
pass
with requests.get(url, stream=True) as r:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

        with requests.get(url,
                          auth=requests.auth.HTTPBasicAuth(client.email,
                                                          client.api_key),
                          stream=True) as r:

where client is controller.client.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works. Thanks a lot, @amanagr!

Pressing enter on one of the buttons in links popup menu
does one of the following, depending on the link:
- narrow to stream
- narrow to user
- open image in system's default viewer
- open link in system's default browser

Narrows to stream/user and opens images

Narrows to stream/user successfuly. Opens selected image in default viewer.
Gives 401 error while trying to open gifs or videos.

Opens links in default browser

Opens links in default browser (code from zulip#397).
Tries to download and open user uploaded media in default system viewer
(code from zulip#359), otherwise opens link in default browser.

Opens images/gifs/links in default system viewer

Opens videos in default viewer
@shreyamalviya shreyamalviya marked this pull request as ready for review July 31, 2019 17:15
@shreyamalviya shreyamalviya changed the title [WIP] Opens message links popup menu Opens message links popup menu Aug 4, 2019
@zulipbot
Copy link
Member

Heads up @shreyamalviya, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master branch and resolve your pull request's merge conflicts accordingly.

@neiljp
Copy link
Collaborator

neiljp commented Nov 23, 2020

@shreyamalviya Thanks for your initial work on this 👍 I'm going to close this now since we have a menu structure in place and PRs open for the remaining features (open in web-browser #698, open downloadable media #740).

If there were other features which you believe were in this PR and are not integrated, in those PRs, we'd appreciate if you were able to file an issue or mention it briefly on #zulip-terminal - thanks!

@neiljp neiljp closed this Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has conflicts size: XL [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants