Commit Graph

7 Commits

Author SHA1 Message Date
Sami Mazouz
e407c66784 New mentions format, decouple usernames from mentions (#65)
* Convert user mentions to new `@"Display Name"#ID` format

* Handle deleted user's mentions

* Convert post mentions to `@"Display Name"#pID` format

* Handle deleted user's post mentions and deleted posts mentions

* Clean display name of `"#{letters}{numbers}` (replace with underscore _)

* Adapt integration tests to new mention formats

* Use a deleted attribute for user mentions

* Introduce cleanDisplayName util

* Detect new format with autocomplete

* Slug needed on rendering only

* Invalidate user mention tag when ID is invalid
This used to be implicitly done, when there was a username attribute configured, formatter would check that all attributes are available and if not invalidate.

since we now only have `displayname` and `id` attributes which are both available from the regex matching, formatter doesn't implicitly invalidate anymore and therefore validates ANY matches. So we explicitly invalidate the tag when the ID does not match a user.

* Allow username mention format with a setting

* Add tests for turning setting on/off

* Move setting check to tag filter
Because the configurator caches, changing the setting only takes effect after the cache is cleared.

* fix: showing autocomplete at the right moment

* Add dockblocks to explain unparsing process
2021-04-21 10:58:54 +01:00
Robert Korulczyk
b06f6470e7 Move locale files from language pack to extension. (#56) 2021-02-17 16:23:40 -05:00
Alexander Skvortsov
13e79e5457 Add empty locale extender to clear cache properly on enable/disable.
See https://github.com/flarum/core/pull/2020#issuecomment-616149583
2020-06-19 22:27:37 -04:00
Toby Zerner
ccda85cc29 Update for composer branch 2015-10-11 13:02:57 +10:30
Toby Zerner
1930fcdd92 Implement notification excerpts 2015-08-21 09:54:57 +09:30
Toby Zerner
0c7bd6e86d Add missing translations 2015-07-23 16:40:11 +09:30
Toby Zerner
da25882280 Update for new API + TextFormatter 2015-07-23 14:28:39 +09:30