Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Adds the notification timeline to mastodon.el closing #34. #178

Merged
merged 7 commits into from
Mar 10, 2018

Conversation

alexjgriffith
Copy link
Collaborator

@alexjgriffith alexjgriffith commented Mar 8, 2018

Changes

  • Can now handle notifications (follow reblog favourite and mention)
  • Tests for each of the rendering functions are included
  • Added keybinding N to mastodon.el for mastodon-notifications-get
  • added mastodon-notifications to ert-helper.el

Note

This builds off of PR #174. Requesting a pull early to get feedback on commit f93d05c which adds the files mastodon-notifications.el and mastodon-notifications-test.el to the package.

@ghost ghost assigned alexjgriffith Mar 8, 2018
@ghost ghost added the review label Mar 8, 2018
@alexjgriffith alexjgriffith force-pushed the notifications branch 2 times, most recently from 524e98c to b13f9c8 Compare March 8, 2018 02:46
@alexjgriffith
Copy link
Collaborator Author

It looks like the tests for rendering the warnings wont pass since they depend on libxml2.

@alexjgriffith
Copy link
Collaborator Author

Now there seams to be an issue with the linting. I will try to fix this on Friday.

Copy link
Collaborator

@hdurer hdurer left a comment

Choose a reason for hiding this comment

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

So cool! I love it.

(let ((status (mastodon-tl--field 'status note)))
(mastodon-tl--insert-status
note
(replace-regexp-in-string
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might this be a good time to extract this regexp monster into a helper function somewhere?

"[\t\n ]*\\'" ""
(if (mastodon-tl--has-spoiler status)
(mastodon-tl--spoiler status)
(mastodon-tl--content status)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: indentation

(mock (mastodon-http--get-json "https://instance.url/api/v1/notifications"))
(mastodon-notifications--get))))

(defun mastodon-notifications--test-type (fun sample)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unused?

@hdurer
Copy link
Collaborator

hdurer commented Mar 8, 2018

BTW: If you wanted to write more tests but also got caught by the missing xml support:
We can always put pre-rendered text (instead of HTML) into the json and just stub out the shr render call...

- Made generalizations to toot and bylines to enable notifications.
- Fixed tl tests to account for the new function arguments.
- fixed whitespace
- Can now handle notifications (follow reblog favourite and mention)
- Tests for each of the rendering functions are included
- Added keybinding N to mastodon.el for mastodon-notifications-get
- added mastodon-notifications to ert-helper.el
@ghost ghost assigned hdurer Mar 10, 2018
@hdurer hdurer merged commit 4167540 into mooseyboots:develop Mar 10, 2018
@ghost ghost removed the review label Mar 10, 2018
@alexjgriffith alexjgriffith deleted the notifications branch March 10, 2018 16:55
jdenen pushed a commit that referenced this pull request Aug 10, 2018
- Can now handle notifications (follow reblog favourite and mention)
- Tests for each of the rendering functions are included
- Added keybinding N to mastodon.el for mastodon-notifications-get
- added mastodon-notifications to ert-helper.el
jdenen pushed a commit that referenced this pull request Aug 11, 2018
- Can now handle notifications (follow reblog favourite and mention)
- Tests for each of the rendering functions are included
- Added keybinding N to mastodon.el for mastodon-notifications-get
- added mastodon-notifications to ert-helper.el
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants