Commit graph

20 commits

Author SHA1 Message Date
Eugen Rochko
eb345f8e8b Custom emoji ()
* Custom emoji

- In OStatus: `<link rel="emoji" name="coolcat" href="http://..." />`
- In ActivityPub: `{ type: "Emoji", name: ":coolcat:", href: "http://..." }`
- In REST API: Status object includes `emojis` array (`shortcode`, `url`)
- Domain blocks with reject media stop emojis
- Emoji file up to 50KB
- Web UI handles custom emojis
- Static pages render custom emojis as `<img />` tags

Side effects:

- Undo  optimization, as I needed to modify it to restore
  shortcode handling in emojify()
- Formatter#plaintext should now make sure stripped out line-breaks
  and paragraphs are replaced with newlines

* Fix emoji at the start not being converted
2017-09-19 02:42:40 +02:00
unarist
134feb2ca8 Escape URL parts on formatting local status () 2017-09-16 21:33:52 +02:00
ふぁぼ原
c71727ca55 Enable to recognize most kinds of characters as URL paths () 2017-09-14 18:03:20 +02:00
Eugen Rochko
73c613dcfc Switch to static URIs, new URI format in both protocols for new statuses ()
* Decouple Status#local? from uri being nil

* Replace on-the-fly URI generation with stored URIs

- Generate URI in after_save hook for local statuses
- Use static value in TagManager when available, fallback to tag format
- Make TagManager use ActivityPub::TagManager to understand new format
- Adjust tests

* Use other heuristic for locality of old statuses, do not perform long query

* Exclude tombstone stream entries from Atom feed

* Prevent nil statuses from landing in Pubsubhubbub::DistributionWorker

* Fix URI not being saved ()

* Add more specs for Status

* Save generated uri immediately

and also fix method order to minimize diff.

* Fix alternate HTML URL in Atom

* Fix tests

* Remove not-null constraint from statuses migration to speed it up
2017-09-06 19:01:28 +02:00
nightpool
0048f7ac72 Whitelist allowed classes for federated statuses ()
* Whitelist allowed classes for federated statuses

Allowed classes are currently:

 - Any microformats class (h/p/u/dt/e-*)
 - the classes mention, hashtag, ellipses and invisible.

this last one is somewhat suspect, but Mastodon currently uses it to render hidden link text.

resolved 

* Fix code style
2017-06-17 20:26:05 +02:00
Akihiko Odaki (@fn_aki@pawoo.net)
267468e232 Remove some arguments of Formatter.instance.format and spec ()
* Remove some arguments of Formatter.instance.format

* Improve spec for Formatter
2017-06-04 14:58:57 +02:00
abcang
4c889085d2 Add test when hashtag and URL are concatenated () 2017-05-24 15:36:10 +02:00
Yamagishi Kazutoshi
d54273621b Skip formatting for cashtag in status text ()
Resolve 
2017-05-24 14:32:53 +02:00
Eugen Rochko
7b5af13d19 Prepend reblogs' wrapper content with "RT @original_author", ()
so that when a reblog parse fails on another instance, it doesn't
look like a misattributed/stolen text
2017-05-12 17:46:44 +02:00
Eugen Rochko
3702e2c924 Fix regressions from ()
* Fix regressions from 

Properly format spoiler text HTML, while keeping old logic for blankness intact
Process hashtags and mentions in spoiler text
Format spoiler text for Atom
Change "show more" toggle into a button instead of anchor
Fix style regression on dropdowns for detailed statuses

* Fix lint issue

* Convert spoiler text to plaintext in desktop notifications
2017-05-11 00:28:10 +02:00
abcang
5b538cde50 Fixed bug that timeline can not be displayed by InvalidURIError () 2017-05-09 18:17:41 +02:00
masarakki
23bf01bcd6 use Twitter::Extractor for creating links () 2017-05-05 19:48:22 +02:00
Yamagishi Kazutoshi
7f02d09887 Decodes URL containing IDN () 2017-04-25 15:03:51 +02:00
abcang
815462feff Fix html escape characters in the URL ()
* fix character escaping in URL

* add tests

* put a comma after the last item

* add HTML escape test
2017-04-19 14:52:18 +02:00
Eugen Rochko
7413dcb28a Fix - Use a better URL parser 2017-02-22 19:35:11 +01:00
Eugen Rochko
d384845469 Fix - Add list of blocked users to the UI; clean up failed push notifications API
Try to fix Travis CI setup
2017-02-05 19:18:11 +01:00
Eugen Rochko
cb33960e0e Fix , fix - URL truncating is now a style so copypasting is not
affected, replaced onClick handler with onMouseUp/Down to detect text
selection not trigger onClick handler then
2017-01-24 17:05:44 +01:00
Eugen Rochko
66e08d880c Improved admin UI 2016-12-13 13:42:10 +01:00
Eugen Rochko
84495615b4 Shorten rendered links (strip protocol and www, truncate to 30 chars), redirect
to sign in page after sign up instead of root path which redirects to /about
2016-10-13 16:51:34 +02:00
Eugen Rochko
3cc47beb6e Refactored generation of unique tags, URIs and object URLs into own classes,
as well as formatting of content
2016-09-09 20:04:34 +02:00