| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The test `mastodon-client--register' specifies that the
`mastodon-http--post' be called with a specific value. The value it
specified is outdated since mastodon.el's current website has changed.
So update the value with URL of the current website.
|
|
|
|
|
|
|
|
|
| |
Before tests start test/ert-helper.el file is loaded which in turn loads
other lisp/* files so that required functions and variables are defined
during tests.
Load lisp/mastodon.el file first before loading other files this solves
the complain during tests that `mastodon-active-user' is not defined.
|
|
|
|
| |
update the README to inform about the new changes.
|
|
|
|
|
| |
Update Copyright holder info for files that have undergone non trivial
changes.
|
| |
|
|
|
|
|
|
| |
Introduce the function `mastodon-client-active-user' for public use
which returns the details of the currently active users. It performs
similar function as that of the function `mastodon-client'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define functions for like:
* mastodon-client-make-user-active: Take one argument USER-DETAILS and
make it the user details of the active user.
* mastodon-client--make-current-user-active: Make the user details
specified in the init file the current user.
* mastodon-client--current-user-active-p: Return user-details if the
current user is active, otherwise return nil.
|
|
|
|
|
|
|
|
|
| |
Store access token in the plstore of the current user. To do that
introduce the function `mastodon-client-store-access-token' of one
argument TOKEN.
Also define a helper function `mastodon-client--make-user-details-plist'
which creates a plist with current users details and returns it.
|
|
|
|
|
|
|
|
|
| |
Get user account ID from the mastodon variables specified in the init
file by introducing the function `mastodon-client-form-user-from-vars'.
Return user account ID in the form "user@instance.com" when the values
of `mastodon-active-user' and `mastodon-instance-url' are "user" and
"https://instance.com" respectively.
|
|
|
|
|
|
| |
Introduce a general version of `mastodon-client--read'[1] with the name
`mastodon-client--general-read'[2] as [1] is too specific. [2] can be
called with with a plstore "key" to retrieve the item keyed by that KEY.
|
|
|
|
|
|
|
|
| |
Introduce a new function `mastodon-client--remove-key-from-plstore'
which removes "key" part from a plstore item.
Refactor `mastodon-client--read' to use
`mastodon-client--remove-key-from-plstore'.
|
|
|
|
|
|
| |
Refactor `mastodon-auth--access-token' and
`mastodon-auth--handle-token-response' to work with the new
authentication mechanism.
|
|
|
|
|
|
| |
Remove `mastodon-auth--generate-token-no-storing-credentials' and
'mastodon-auth--generate-token-and-store' as these two are no longer
needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor `mastodon-auth--generate-token' to work with new user
authentication and token generation mechanism. This enables mastodon.el
to work with 2FA and also not to handle password directly.
In this implementation mastodon-auth--generate-token gets authorization
code from the user and sends post request to mastodon server. Ask for
authorization code from the user using two helper functions:
* mastodon-auth--ask-authorization-code: Explain to the user what the
user needs to do to get the authorization code. Store this explanation
message in variable `mastodon-auth--explanation'.
* mastodon-auth--get-browser-login-url: Return a appropriate query
string appended to url to the caller, which is needed by the user to
access the authorization code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mastodon API requires some info that needs to be passed during app
registration and user authentication. Those info were hard coded into
various functions.
Introduce three variables (defvars):
1. mastodon-client-scopes
2. mastodon-client-website
3. mastodon-client-redirect-uri
use them to abstract those info.
Also refactor `mastodon-client--register' function in terms of these
variables.
|
|
|
|
|
|
| |
Add helper function `mastodon-http-append-query-string' which create
URLs with query strings appended to its end. (see doc string for
details.)
|
|
|
|
|
|
| |
Update the docstring for the defcustom `mastodon-instance-url' to
clarify what it's value should be to reflect the changes introduced in
the previous commit.
|
|
|
|
|
|
|
|
|
|
|
| |
Use `mastodon-active-user' and `mastodon-instance-url' to determine
which mastodon account the user wants to be active for the current
session of Emacs. See the documentation string of this variable for
details on how to use it.
This new variable becomes necessary to prevent conflict when a user has
two accounts on the same instance, that is same value of
`mastodon-instance-url'.
|
|
|
|
|
| |
we use it as a number various times so let's leave it a number, then convert
to string for display in toot info.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
we remove the hacky non-check for a user handle from mastodon-tl--process-link, so that it
/always/ runs mastodon-tl--extract-userhandle-from-url.
the in extract-userhandle-from-url, we test if the url host = local instance.
if so, we just return buffer-text, which = "@user", with no suffix. else we
return a full "@user@instance.url" handle.
remove unused var after fix to userhandle parsing
|
|
|
|
|
|
|
|
| |
some servers have 'max_toot_chars, but others seem to have 'max_characters,
under statuses, under configuation.
we allow for both types, but also we check our var isn't nil before trying to
check it's length, which broke toot--send in some cases.
|
|
|
|
| |
finally we now display all types of notifications! it's about bloody time.
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
which was a copy of mastodon-tl--insert-status.
we revert to having just the latter as main function with optional argument.
mastodon-notifications--insert-status just calls it with the arg ID.
the reason we need the difference is to ensure notifications have their own
ID, and not that of the toot the notif refers to, attached as property
"toot-id". then we have all functionality working on notifications, such as
boosting mentions and so on.
|
|/
|
|
|
|
|
|
|
|
| |
previously we had duplication of functions depending on whether we were in
follow requests view or notificaitons view.
now we just check which kind of f-req we have and act accordingly.
main function being `mastodon-notifications--follow-request-process'.
also updates keybindings for both views. we no longer need them included
separately in profile-mode.
|
|
|
|
| |
and remove duplicate mastodon-toot-mode call.
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|