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

Add support for dm @username to compose a new message #2

Open
chrismessina opened this issue Jan 6, 2021 · 1 comment
Open

Add support for dm @username to compose a new message #2

chrismessina opened this issue Jan 6, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@chrismessina
Copy link
Owner

Ideally Alfred would offer autocomplete, but that's too advanced for me...

Since DMs require numerical user IDs, I'll have to find a way to convert a username to the corresponding user ID and then initiate a new DM URL in the form:

https://twitter.com/messages/{var:userId}-{query}?text=

And also add a non-exporting userId to the environmental variables.

@chrismessina chrismessina added the enhancement New feature or request label Jan 6, 2021
@chrismessina chrismessina self-assigned this Jan 6, 2021
@chrismessina
Copy link
Owner Author

This could possibly be implemented as a List Filter where the flow would be like:

  1. Authenticate a local Twitter client to get one's followee list; store the list containing IDs, usernames, and display names
  2. Load this list as a CSV into a List Filter
  3. Use dm to access type-to-suggest completion using that List Filter in Alfred's UI
  4. upon actioning, open the URL prefilled with https://twitter.com/messages/{var:userId}-{query} (where query is the user ID of the recipient)
  5. if a space is typed after the username, use that text to prefill message text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant