| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| | |
- make sure we get ID from parent if its a fave/boost
- avoid duplicates if user or booster already in mentions list
|
| | |
|
| |\
| | |
| | |
| | |
| | |
| | | |
Red_Starfish/mastodon-up.el:login into develop
Reviewed-on: https://codeberg.org/martianh/mastodon.el/pulls/255
|
| | |
| | |
| | |
| | |
| | | |
The variable `mastodon-auth-source-file' serves no purpose so change it
from a defcustom to a defvar. Also update its docstring to document it.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Hold the explanation string in the variable
`mastodon-auth--user-unaware'. This explanation is provided to old
mastodon.el users who are not aware of the 2FA related changes.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Most old users of the mastodon.el wouldn't know about the introduction
of new variable `mastodon-active-user'[1]. Our goal is to make them
aware.
Set the default value of [1] to nil. This way we can know that the user
hasn't set [1] properly because user is unaware of it.
In the definition of `mastodon-auth--access-token', check [1]'s value
and if it's null, explain to the user about the new situation. Finally
signal the error "Variables not set properly".
We have considered the possibility of automating the process but since
the new login mechanism depends on setting [1] *in the init file*, the
only way to automate it would be to write to user's init file which we
consider to be very rude and shouldn't be done by this package.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of using the minibuffer prompt to present the explanation what
the user needs to do to get authorization code, use Emacs buffer and
Window. The minibuffer prompt should have 2-3 words.
This increases the readability of the explanation.
Of course delete explanation buffer and restore the window configuration
as it was after reading from minibuffer.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change the name of the function `mastodon-auth--ask-authorization-code'
to `mastodon-auth--request-authorization-code'.
Suggested-by: Marty Hiatt <martianhiatus@riseup.net>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
mastodon.el currently follows the convention where all function names
should have two dashes (not one dash) in between function and namespace
names. Update all function names to follow this convention.
See issue #205 and pull request #255
|
| | |
| | |
| | |
| | |
| | | |
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'.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
because we switched to using boost/fave JSON rather than parent, as
'toot-json, replies to these toots were broken (mentions, etc.)
so now we attach both bits of data and selectively pull from each.
|
| | |
| | |
| | |
| | |
| | | |
we already have the same test for declaring lingva-translate fun, so this
shouldn't be needed and seems to prevent our fun from loading.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
do not use the time stamp of the boosting/faving.
in other views, mastodon-tl--field already handles this by fetching from
'reblog if present, but in notifs, there's no reblog section, and instead
there's a status section. so we fetch from status if present, else fallback to
using --field.
this became necessary when we started attaching the boost/fave json to such
notifs, rather than the json of the boosed/faved toot.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
"unknown" type is given when a media image fails to load or similar.
nil is e.g. when a profile picture isn't given, and missing.png is used as a replacement
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
we just modify the if test to not run in accounts buffers, which means we end
up using the next-toot solution, as was originally the case.
hopefully a profile view will always have a toot or user or sth. else we cd
find a better solution
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
to achieve this, in notifications--format-note, we run
notifications--insert-status on 'note' rather than 'status'
handle mentions/reblogs when following from a notif
|
| | |
| | |
| | |
| | | |
this could easily be made into a macro supporting any emacs translation pkg
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
in profile--add-author-bylines, which now prints profile notes
|
| | |
| | |
| | |
| | | |
- also make profile--extract-ysers-handles work on user listings as well as toots
|
| | |
| | |
| | |
| | | |
just feedback for when we call it when not on anything
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
this is more needed now that we have some other buffers like follow
suggestions and follow requests, which want to be able to use these functions.
previously, if any of them were called in these buffers when not on the
correct item, the buffer would reload and duplicate.
ultimately this was probably due to tl--property calls failing, which causes
goto-next-toot to be called, which when it also fails calls tl--more.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
not prifile--add-author-bylines
autoload insert-users-propr in -profile
|
| | |
| | |
| | |
| | | |
ensures we hever have an empty author name slot
|