aboutsummaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | toot.el: refactor set-cwmarty hiatt2022-08-071-10/+12
| | |
| * | text-mode for update profile notemarty hiatt2022-08-031-0/+1
| | |
| * | cycle thru profile view: toots, followers, followingmarty hiatt2022-08-032-5/+20
| |/
* | tl--init*: fix a stray bracketmarty hiatt2022-08-191-8/+7
| |
* | fix formatting of unmute-usermarty hiatt2022-08-101-1/+2
| |
* | re-allow boost/fave of own toots!marty hiatt2022-08-081-20/+21
| |
* | update discover bindings for profile followers/followingmarty hiatt2022-08-031-2/+2
| |
* | text-mode for update profile notemarty hiatt2022-08-031-0/+1
| |
* | bump version in boilerplatemarty hiatt2022-07-3113-15/+15
|/
* --thread: use --api for get-json url for tootmarty hiatt2022-07-271-4/+2
|
* refactor toggle boost and toggle favemarty hiatt2022-07-261-37/+42
|
* --thread: fetch current toot before printing threadmarty hiatt2022-07-261-1/+6
| | | | fixes #264, where if you fave a toot then enter its thread, fave status is lost.
* no fave counts for fol-req notifsmarty hiatt2022-07-231-1/+8
|
* tl--thread: FIX fetching of toot id for notifs/use parent tootmarty hiatt2022-06-271-2/+7
|
* --get-buffer-property: or rather than ifmarty hiatt2022-06-271-4/+3
|
* tl--more: message before and after appending more toots.mousebot2022-05-131-1/+3
| | | | | | | | | this user feedback prevents hitting 'n' running tl--more again before toots have been appended, when what the user wanted was only to naviagate to the next too after they'd been appended. running tl--more before toots are appended causes a bug of appending the same set of toots twice.
* Merge branch 'develop'mousebot2022-04-0510-257/+818
|\
| * flychecks and docstringsmousebot2022-04-053-3/+7
| |
| * toot: message if translate-toot called without lingva.elmousebot2022-04-051-3/+5
| |
| * toot: missing parens in --reply booster checksmousebot2022-04-051-2/+2
| |
| * toot: indents and flycheckmousebot2022-04-051-10/+11
| |
| * toot--reply: improve mentions in repliesmousebot2022-03-291-6/+20
| | | | | | | | | | | | - make sure we get ID from parent if its a fave/boost - avoid duplicates if user or booster already in mentions list
| * call lingva-translate with optional variable-pitch argmousebot2022-03-251-2/+5
| |
| * Merge pull request '2FA login support' (#255) from ↵martianh2022-03-234-77/+272
| |\ | | | | | | | | | | | | | | | Red_Starfish/mastodon-up.el:login into develop Reviewed-on: https://codeberg.org/martianh/mastodon.el/pulls/255
| | * auth: make mastodon-auth-source-file a defvarAbhiseck Paira2022-02-251-8/+4
| | | | | | | | | | | | | | | 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.
| | * auth: define variable mastodon-auth--user-unawareAbhiseck Paira2022-02-251-0/+15
| | | | | | | | | | | | | | | | | | 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.
| | * auth: make old mastodon.el users awareAbhiseck Paira2022-02-252-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * auth: make the wording in mastodon-auth--explanation clearerAbhiseck Paira2022-02-251-5/+11
| | |
| | * auth: present auth code request in a nicer wayAbhiseck Paira2022-02-251-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * auth: change name to mastodon-auth--request-authorization-codeAbhiseck Paira2022-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | Change the name of the function `mastodon-auth--ask-authorization-code' to `mastodon-auth--request-authorization-code'. Suggested-by: Marty Hiatt <martianhiatus@riseup.net>
| | * change '-' to '--' in between function and namespace namesAbhiseck Paira2022-02-233-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | 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 infoAbhiseck Paira2022-01-173-0/+3
| | | | | | | | | | | | | | | Update Copyright holder info for files that have undergone non trivial changes.
| | * define autoloads and defvars to silence the byte compilerAbhiseck Paira2022-01-172-0/+9
| | |
| | * make a public interface for accessing user detailsAbhiseck Paira2022-01-171-0/+17
| | | | | | | | | | | | | | | | | | 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'.
| | * functions for making/checking active usersAbhiseck Paira2022-01-171-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 plstore of the current userAbhiseck Paira2022-01-171-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 account ID from user variables specified in the init fileAbhiseck Paira2022-01-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 plstore reading functionAbhiseck Paira2022-01-171-0/+7
| | | | | | | | | | | | | | | | | | 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.
| | * abstract plstore implementation details of getting valueAbhiseck Paira2022-01-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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 *-access-token and *-handle-token-responseAbhiseck Paira2022-01-131-10/+22
| | | | | | | | | | | | | | | | | | Refactor `mastodon-auth--access-token' and `mastodon-auth--handle-token-response' to work with the new authentication mechanism.
| | * remove functions no longer neededAbhiseck Paira2022-01-131-43/+0
| | | | | | | | | | | | | | | | | | Remove `mastodon-auth--generate-token-no-storing-credentials' and 'mastodon-auth--generate-token-and-store' as these two are no longer needed.
| | * re-implement user auth and token generation mechanismAbhiseck Paira2022-01-131-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * abstract Mastodon API request infoAbhiseck Paira2022-01-131-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'Abhiseck Paira2022-01-131-0/+8
| | | | | | | | | | | | | | | | | | Add helper function `mastodon-http-append-query-string' which create URLs with query strings appended to its end. (see doc string for details.)
| | * mastodon.el: update `mastodon-instance-url' docstringAbhiseck Paira2022-01-131-1/+15
| | | | | | | | | | | | | | | | | | 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.
| | * mastodon.el: introduce new defcustom `mastodon-active-user'Abhiseck Paira2022-01-131-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
| * | attach parent JSON to fave/boost notifs to fix repliesmousebot2022-03-193-8/+13
| | | | | | | | | | | | | | | | | | | | | 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.
| * | remove require test for --translate-toot-textmousebot2022-03-181-2/+2
| | | | | | | | | | | | | | | 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.
| * | add header line to update profile note buffermousebot2022-03-141-0/+4
| | |
| * | autoload and binding for translate-toot-textmousebot2022-03-131-0/+5
| | |