Commit Graph

15 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
Franz Liedke
3390bd5b02 Apply fixes from StyleCI 2019-11-29 23:02:17 +00:00
Franz Liedke
95d01f3136 Depend on Laravel 5.7 for correct index names 2019-02-03 20:51:10 +01:00
Franz Liedke
731da10088 Migrations: Fix dropping foreign keys
Passing an array to dropForeign does not mean dropping multiple indices,
but rather dropping a key on multiple tables.

Passing a string means that this string will be interpreted as index
name, not as name of the indexed column. Passing an array with one
string is therefore correct, in order to benefit from automatic index
name generation.
2018-11-30 14:04:44 +01:00
Toby Zerner
147fc1a65e Fix index names in migrations
This can be reverted when we upgrade to Laravel 5.7.
2018-11-27 22:33:45 +10:30
Toby Zerner
67c7b45dc8 Database changes (#34)
* Implement database changes

* Split foreign keys in to their own migrations; rename pivot tables

* Use whereColumn

* Update core attribute names
2018-09-16 20:50:16 +02:00
Toby Zerner
1d79d8edeb Apply fixes from StyleCI
[ci skip] [skip ci]
2016-11-29 05:29:44 +00:00
Franz Liedke
ec3db146fc Use new shortcuts for migrations 2016-03-04 01:12:03 +09:00
Franz Liedke
f270a609cb Use new migration format 2016-02-24 23:13:28 +09:00
Toby Zerner
ccda85cc29 Update for composer branch 2015-10-11 13:02:57 +10:30
Toby Zerner
354da3c5c9 Namespace migrations 2015-09-17 09:09:37 +09:30
Toby Zerner
384330da77 Add LICENSE information 2015-09-04 12:31:19 +09:30
Toby Zerner
6606f416af Update migrations 2015-08-14 12:55:23 +09:30
Toby Zerner
c780e620c0 Fix mistake in table name 2015-05-29 18:22:51 +09:30
Toby Zerner
57bb8702de Initial commit 2015-05-14 22:01:03 +09:30