Commit Graph

424 Commits

Author SHA1 Message Date
Sami Mazouz
bf52743510
chore: improve group mentions parsing (#3723)
* chore: improve group mentions color handling
* Avoid storing the `GroupMention--dark` and light classes on the database.
* Avoid recreating YIQ logic on the backend.
* Improve text color flexibility through CSS variables.
* Apply fixes from StyleCI
* chore: tweak tests
* chre: unused import

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-22 14:11:13 +01:00
Sami Mazouz
da1bf8da21
chore(phpstan): enable phpstan in bundled extensions (#3667)
* feat(phpstan): pick up extended model relations typings
* feat(phpstan): pick up extended model date attributes
* feat(core): introduce `castAttribute` extender
Stops using `dates` as it's deprecated in laravel 8
* feat(phpstan): pick up extended model attributes through casts
* fix: extenders not resolved when declared namespace
* fix(phpstan): new model attributes are always nullable
* chore(phpstan): add helpful cache clearing command
* Apply fixes from StyleCI
* chore: improve extend files provider logic
* chore: rename `castAttribute` to just `cast`
* chore: update phpstan package to detect `cast` method
* chore: enable phpstan in bundled extensions
* chore: rebasing conflicts
* chore: rebasing conflicts
* chore: typings for latest 1.7 changes

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-19 21:49:38 +01:00
flarum-bot
6adae00f72 Bundled output for commit d7f4975330
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-01-17 18:15:45 +00:00
Sami Mazouz
d7f4975330
feat: introduce frontend extenders (#3645)
* feat: reintroduce frontend extenders
* chore: used `Routes` extender in bundled extensions
* chore: used `PostTypes` extender in bundled extensions
* chore: `yarn format`
* chore: naming
* chore(review): unnecessary check
* chore(review): stay consistent
* chore: unused import

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-17 19:10:24 +01:00
Sami Mazouz
4a38047bfb
Merge branch 'main' into merge-1.6.3-into-main 2023-01-13 19:12:11 +01:00
StyleCI Bot
be63b28437
Apply fixes from StyleCI 2023-01-10 15:00:37 +01:00
Sami Mazouz
132fdea659
Merge pull request from GHSA-22m9-m3ww-53h3
* fix: check post visibility when mentioning

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* fix: `mentionsPosts` include is not used and leaks private posts

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* chre: use `PostRepository`

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-10 15:00:37 +01:00
flarum-bot
0eff1f6b2d Bundled output for commit a53a0db2b7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-12-12 09:48:42 +00:00
Sami Mazouz
a53a0db2b7
feat(tags): admin tag selection component (reusable tag selection modal) (#3686)
* chore: move `KeyboardNavigation` to `common` first
* feat: exract reusable `TagSelectionModal` from `TagDiscussionModal`
* fix: improve for generic use
* feat: add select tags admin setting component
2022-12-12 10:44:33 +01:00
flarum-bot
0e238a9c82 Bundled output for commit 64fa35f2f3
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-25 17:25:24 +00:00
flarum-bot
c50c924242 Bundled output for commit 18bdd48835
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-16 10:30:13 +00:00
flarum-bot
ab56aefeaa Bundled output for commit 259db92b9a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-10 23:30:18 +00:00
Daniël Klabbers
1e00e3fdbb chore: dependency on core updated for extensions 2022-11-10 13:48:00 +01:00
flarum-bot
1a81c98d43 Bundled output for commit c98e6ba5a7
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-07 15:55:28 +00:00
Ian Morland
c98e6ba5a7
fix: groupmentions have poor contrast on some backgrounds (#3672)
* fix: poor text contrast on some backgrounds
* use hexdec()
* fix render test
* appears to be working now
2022-11-07 16:49:47 +01:00
flarum-bot
32ac0a8d8f Bundled output for commit 827e905f8e
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-11-05 19:34:25 +00:00
Ian Morland
827e905f8e
[mentions] feat: group mentions (#3658)
* wip: group mentions

* Apply fixes from StyleCI

* chore: format

* group mention autocomplete

* chore: format

* remove console.log

* implement notifications

* prevent guest and member groups from being mentioned

* Update extensions/mentions/less/forum.less

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* rename displayname to groupname

* Update extensions/mentions/src/Formatter/FormatGroupMentions.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* remove redundant unparse

* simplify migrations

* add group deleted translation

* Apply fixes from StyleCI

* handle everything falsy

* Include icon in group mention preview

* remove box-shadow from autocomplete group results

* Add color to preview

* chore: format

* Remove box shadow from group autocomplete results

* Update extensions/mentions/migrations/2022_10_21_000000_create_post_mentions_groups_table.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* remove unneeded migration

* prevent former group icon from beingdisplayed

* add group searcher with permissions

* Apply fixes from StyleCI

* Search groups based on canSearchGroups permission

* Don't include virtual groups in results

* Add search groups translation

* Revert "remove unneeded migration"

This reverts commit 9347665baa.

* Revert "Update extensions/mentions/migrations/2022_10_21_000000_create_post_mentions_groups_table.php"

This reverts commit 8406d51df2.

* add searchGroups permission to tests

* Apply fixes from StyleCI

* Add default searchGroups permission

* Apply fixes from StyleCI

* Update extensions/mentions/js/src/forum/addComposerAutocomplete.js

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update extensions/mentions/migrations/2022_10_21_000000_create_post_mentions_groups_table.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* remove unneeded migration, correct table table

* correct table name in down migration

* Remove group searcher

* Apply fixes from StyleCI

* Remove group searching from composer autocomplete

* Add mentionGroups permission

* Apply fixes from StyleCI

* prevent post preview from rendering a group mention when user does not have permission

* remove test changes

* wip: expose ServerRequestInterface to textformatter parse()

* Apply fixes from StyleCI

* Set post content properly

* php 7.x compatibility

* begin adding groupmention tests

* Apply fixes from StyleCI

* test virtual groups don't mention

* Apply fixes from StyleCI

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update extensions/mentions/extend.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update extensions/mentions/extend.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* requested changes

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/tests/integration/api/groups/ListTest.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/src/Search/SearchServiceProvider.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/src/Extend/Formatter.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* remove default permission migration

* try using datetime column instead of timestamp

* Apply fixes from StyleCI

* chore: remove commented code

* add tests

* Apply fixes from StyleCI

* Pass actor to parser instead of ServerRequest

* Allow for  to be null

* Update framework/core/src/Extend/Formatter.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* pass actor instead of request

* Apply fixes from StyleCI

* actor instead of request

* remove serverrequest

* Apply fixes from StyleCI

* remove dupe actor

* Update extensions/mentions/src/Formatter/CheckPermissions.php

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* fix type in comment

* group does not have the relation, post does

* test: invalid, deleted, fresh data mentions

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

* Apply fixes from StyleCI

* fix: group mentions don't work when editing posts

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2022-11-05 19:29:01 +00:00
Daniël Klabbers
a35df8c139 chore: v1.5.0 preparations 2022-09-13 10:55:30 +02:00
Sami Mazouz
6ffa9e3736
fix(mentions): accessing id of null user relation (#3618)
* test: editing a post with deleted author and mentions
* fix(mentions): accessing `id` of null `user` relation

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-26 10:38:00 +01:00
flarum-bot
082117d8bc Bundled output for commit 11a9b73610
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-08-17 13:02:21 +00:00
Hasan Özbey
11a9b73610
fix: use isCollapsed instead of rangeCount (#3581) 2022-08-17 13:56:03 +01:00
flarum-bot
71731819fb Bundled output for commit b01b75e367
Includes transpiled JS/TS.

[skip ci]
2022-08-04 08:11:58 +00:00
Sami Mazouz
4e52f0e420
chore: monorepo local development improvements (#3523)
* chore: centralize editorconfig
* chore: tweak tsconfigs for local development
* revert src path change
* fix: akismet type checking requires flag ext `@types`
* fix: make tags route optional to avoid typescript typing error
2022-07-18 15:19:11 +01:00
David Wheatley
5721a2f487
fix: replace .fa() mixin usage with .fas() (#3537) 2022-07-15 23:16:49 +01:00
Daniël Klabbers
556d461cfb chore: update v1.4 constraints and update issues url 2022-07-12 23:30:03 +02:00
Sami Mazouz
4da21463c1
fix: multiple createdAt columns in query causes conflicts (#3506)
* test: list posts with mentions filter and `createdAt` sort
* fix: multiple `createdAt` columns in query causes conflicts
* chore: link to pull request for context

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-09 10:36:48 +01:00
Sami Mazouz
abc12b4ba5
chore: add .gitattributes to extensions to export-ignore files. (#3513)
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-07-08 20:38:20 +01:00
flarum-bot
79e0f44324 Bundled output for commit 976a03c9e5
Includes transpiled JS/TS.

[skip ci]
2022-06-19 21:30:47 +00:00
Sami Mazouz
976a03c9e5
fix: post mention notification errors with _no content_ subjects (#3493)
Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-06-19 22:27:39 +01:00
Sami Mazouz
27fb011bf5
chore: with yarn workspaces we only need a single yarn.lock (#3464)
* chore: yarn workspaces means we only need a single `yarn.lock`
* fix: add a `cache_dependency_path` workflow input
* fix: re-introduce `env.cache_dependency_path`
2022-06-19 19:01:21 +01:00
Rafael Horvat
776f9bf132
feat: add automatic created/updated timestamps for various tables (#3435)
Adds timestamps for various tables:

- groups
- group_user
- group_permission
- tags
- discussion_tag
- post_mentions_post
- post_mentions_user
2022-06-07 20:35:27 +01:00
Sami Mazouz
0a3f449f9e
fix: post mentions with deleted author not rendering (#3432) 2022-06-02 13:38:24 +01:00
Daniël Klabbers
592039c483 update constraint to v1.3 2022-05-10 16:28:35 +02:00
Ian Morland
b0fa795cc9
fix: extensions not being able to use the renderer without context (#3382) 2022-04-07 17:53:37 +01:00
flarum-bot
c944fd0029 Bundled output for commit 98e607a704
Includes transpiled JS/TS.

[skip ci]
2022-04-06 15:56:16 +00:00
Alexander Skvortsov
a595665bfb
fix: Assorted Typing Fixes (#3348)
With all the commits below, we resolve all outstanding typing issues in the repo, and CI jobs run green.

* fix: Convert DashboardPage and DashboardWidget to TypeScript

* fix: fix type errors in package manager ext

* fix: Convert Post component to TypeScript

* fix: avatar typings should accept null user

* fix: convert Notification component to TypeScript

* fix: properly use `typeof` in ForumApplication

* feat: make Notification content attr generic

* chore: format Notification component

* fix: Convert DiscussionRenamedNotification to TypeScript

* fix(pusher) move shims to a location where they get applied

* fix(pusher): fix some typing errors

* fix(akismet): fix some typing issues

* chore: update core dist typings

* chore(pusher): format

* fix: anchorScroll should accept string selectors

* fix: more accurately represent ApiQueryParamsPlural

* fix: convert PostStreamState to TypeScript

* chore(core): rebuild typings

* feat: allow extending app.routes

* fix: more flexible typings for highlight.ts

* fix: use primitive `number` type for Discussion typings

* fix: convert DiscussionListItem to TypeScript

* chore: rebuild core typings

* fix: final pusher type fixes

* feat: start tags TypeScript conversion

* fix: require-dev tags in pusher for CI TypeScript purposes.

* chore(core): format

* chore(tags): build dist typings

* feat(pusher): use dist types from tags.

* feat: convert flags to TypeScript

* chore(flags): generate dist typings

* fix(akismet): last type errors

* chore: update .yarn-integrity

* chore: partially run flarum-cli audit infra --fix

The tsconfig changes from that command are ignored, since we don't yet support "replacable sections" that would let us add custom config.

* chore: use type imports

* fix: broader gitattributes

* chore: run flarum-cli audit infra --monorepo --fix

* feat: make `app.data` typings extensible

* chore(core): format

* chore: boost tags TypeScript coverage

* fix(tags): further increase type coverage.
2022-03-23 11:43:14 -04:00
Alexander Skvortsov
f2910d8763 chore: add version to core/ext package.json
This is necessary for yarn workspaces to work.
2022-03-11 19:12:11 -05:00
Alexander Skvortsov
5fc0b4963a chore: flarum-cli audit infra --fix 2022-03-11 18:02:51 -05:00
Alexander Skvortsov
693da58c41 chore: set up composer path repos 2022-03-11 18:02:49 -05:00
Alexander Skvortsov
2bf6b12a64 chore: remove centralizable repo config
- Remove .github conf folder from Flarum packages

- Remove styleci config from all packages
2022-03-11 18:01:44 -05:00
Daniel Klabbers
cf7916cebd Release v1.2 2022-01-20 12:45:05 +01:00
flarum-bot
7dbc5b153f Bundled output for commit e9feb0aa58
Includes transpiled JS/TS.

[skip ci]
2022-01-20 08:46:41 +00:00
Alexander Skvortsov
e9feb0aa58 chore: flarum-cli audit infra --fix 2022-01-20 03:45:09 -05:00
flarum-bot
4c8bba3eb1 Bundled output for commit 0d9c95b096
Includes transpiled JS/TS.

[skip ci]
2022-01-08 21:58:28 +00:00
Ian Morland
0d9c95b096 [chore] Update JS imports (#80) 2022-01-08 16:57:13 -05:00
flarum-bot
4ac4338f9a Bundled output for commit 140d6ea221
Includes transpiled JS/TS.

[skip ci]
2021-11-28 15:57:41 +00:00
David Wheatley
140d6ea221 chore: format javascript 2021-11-28 15:56:30 +00:00
David Wheatley
dc35f048b5 docs: changelog for 1.1.3 2021-11-28 15:54:07 +00:00
Ian Morland
7d3bc4a092 fix?: Allow mentions from non-post objects (#79) 2021-11-28 09:52:29 +01:00
flarum-bot
e8cb1559cf Bundled output for commit f41d6bba7e
Includes transpiled JS/TS.

[skip ci]
2021-11-23 21:39:39 +00:00
David Wheatley
f41d6bba7e fix: errors on texteditor re-use again (#78)
* fix: errors on texteditor re-use again

* fix: use arrow func to not alter `this`

* fix: more replacements
2021-11-23 21:38:28 +00:00
flarum-bot
2721ac8498 Bundled output for commit 302d92aa47
Includes transpiled JS/TS.

[skip ci]
2021-11-23 20:45:52 +00:00
Gianni Guida
302d92aa47 feat: added compat exports and extensibility (#76)
* Added extensibility

* Corrected object export

* Exported the `insertMention` util

* Return a `Promise` in the `reply` util (for extensibility)

* Removed initialization utils

Co-authored-by: Rafael Horvat <rafael.horvat@glowingblue.com>
2021-11-23 20:44:46 +00:00
David Wheatley
f611938707 chore: changelog for 1.1.2 2021-11-16 18:54:03 +00:00
flarum-bot
94bb882120 Bundled output for commit 69657f63b7
Includes transpiled JS/TS.

[skip ci]
2021-11-13 22:00:12 +00:00
David Wheatley
69657f63b7 fix: autocomplete errors with TextEditor re-use (#77) 2021-11-13 21:58:52 +00:00
flarum-bot
61020eadd6 Bundled output for commit 056c79a908
Includes transpiled JS/TS.

[skip ci]
2021-11-05 19:05:24 +00:00
Sami Mazouz
056c79a908 fix: Cannot reply to posts by deleted authors (#75) 2021-11-05 20:04:20 +01:00
flarum-bot
b245b41b67 Bundled output for commit ffd982df7f
Includes transpiled JS/TS.

[skip ci]
2021-10-18 19:53:25 +00:00
SychO9
ffd982df7f Merge branch 'v1.1.1'
# Conflicts:
#	js/dist/forum.js
#	js/dist/forum.js.map
2021-10-18 20:49:03 +01:00
SychO9
f1f6da10fd chore: Release v1.1.1 2021-10-18 20:27:11 +01:00
Sami Mazouz
3437d7229e fix: Missing # from autocompleted user mention format (#74) 2021-10-18 20:17:22 +01:00
flarum-bot
e63f030094 Bundled output for commit a2832af01f
Includes transpiled JS/TS.

[skip ci]
2021-10-13 18:58:59 +00:00
Alexander Skvortsov
a2832af01f Only search users via rest API if user has permission (#73)
Closes https://github.com/flarum/core/issues/3070

If the user doesn't have permission to search users, there will currently be browser errors, as the current implementation will still attempt to search and autocomplete. In this PR, we check for permission before searching. The dropdown will still support autocomplete of users currently participating in the discussion.
2021-10-13 14:57:45 -04:00
David Wheatley
ac427a8a4a chore: bump bundled extension constraint to core 1.1 2021-10-13 08:05:43 +01:00
Alexander Skvortsov
c1318d641c Release v1.1.0 2021-10-11 21:12:56 -04:00
flarum-bot
367cca8cc7 Bundled output for commit 2cb00d6773
Includes transpiled JS/TS.

[skip ci]
2021-10-06 20:31:59 +00:00
Alexander Skvortsov
2cb00d6773 Fix missing space after mentions inserted via post reply
Closes https://github.com/flarum/core/issues/3096
2021-10-06 16:30:45 -04:00
flarum-bot
7c954129f0 Bundled output for commit 84dcde4e85
Includes transpiled JS/TS.

[skip ci]
2021-10-06 20:24:50 +00:00
Alexander Skvortsov
84dcde4e85 Fix delayed mention search results
Fixes https://github.com/flarum/core/issues/3095
2021-10-06 16:22:04 -04:00
Alexander Skvortsov
03c6db4c8d Import function correctly
There was a typo in the function's name which broke mentions.
2021-10-06 16:15:01 -04:00
flarum-bot
798fadbddc Bundled output for commit 6173c3d612
Includes transpiled JS/TS.

[skip ci]
2021-09-20 17:43:50 +00:00
David Wheatley
6173c3d612 Minor refactors in frontend JS (#69)
* Add Prettier

* Update dependencies; add typescript setup

* Add tsconfig

* Rewrite some mentions frontend into TS

* Fix use of username instead of display name

* Change back to JS

* Remove commented code

* Update function name to match filename

* Update getMentionText.js

* Simplify condition

* Bump packages to stable versions; use prettier package

* Make functions use camel case

* Update js/package.json

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Don't access data directly

* Update js/src/forum/addComposerAutocomplete.js

Co-authored-by: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com>

* Update tsconfig.json

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com>
2021-09-20 18:42:38 +01:00
Sami Mazouz
6a5d7e9864 Fix unrecognised user/post mentions (#71)
* fix: Use proper mentionsUsers serializer
The only reason we haven't seen any issues with this up until now is because we have not has to include the relationship in any responses.

* fix: User/Post mentions showing as deleted after saving
The reason this happens is because the modified relationship is not refreshed, so the formatter doesn't recognize the new mentions as valid.
2021-08-30 18:23:59 +01:00
Sami Mazouz
af9e5a9cc9 Eager load more necessary related mentions (#72)
* perf: Eager load related mentions from the extender

These missing relations caused more queries to be called, the more mentions posts have the more queries produced.

* perf: Eager load models in show endpoints

Can't use the extender for that
2021-08-23 20:33:42 +01:00
Daniel Klabbers
5217b8b6be fix branch alias 2021-05-25 22:51:07 +02:00
Daniel Klabbers
d37a43c795 changes for stable 2021-05-25 16:26:34 +02:00
flarum-bot
37c1933d37 Bundled output for commit 07e93747be
Includes transpiled JS/TS.

[skip ci]
2021-05-25 07:03:39 +00:00
SychO9
b0a301229a Tweak test name and add posts mention equivalent test 2021-05-25 00:15:10 +01:00
SychO9
cc62044e6f Support smart quotes in mentions format 2021-05-24 21:49:31 +01:00
Sami Mazouz
a311edf106 Update tests to use setting method (#68) 2021-05-17 22:46:02 +01:00
Alexander Skvortsov
53bbb63a24 Bump composer reqs for 1.0.0 2021-05-16 18:28:41 -04:00
David Wheatley
59320d401f Update copyright year 2021-05-15 00:56:10 +01:00
flarum-bot
b7e9d729c1 Bundled output for commit 8ef8dee532
Includes transpiled JS/TS.

[skip ci]
2021-05-14 22:15:06 +00:00
SychO9
8ef8dee532 Use slug for user mentions page 2021-05-14 23:13:45 +01:00
flarum-bot
4d8f105d07 Bundled output for commit ae69dd25c7
Includes transpiled JS/TS.

[skip ci]
2021-05-13 00:02:51 +00:00
Alexander Skvortsov
ae69dd25c7 Update for ICU MessageFormat 2021-05-12 19:27:13 -04:00
flarum-bot
bc187d9b83 Bundled output for commit 3e596aaadf [skip ci] 2021-05-12 19:43:31 +00:00
Sami Mazouz
3e596aaadf Move replies preview dropdown out of Post-footer (#55) 2021-05-12 20:42:33 +01:00
Alexander Skvortsov
8ed08b63cd Fix mentioned filtering (#67) 2021-05-04 14:57:29 -04:00
flarum-bot
e2b309ad95 Bundled output for commit 02d3355989 [skip ci] 2021-05-02 20:38:50 +00:00
SychO9
02d3355989 Add space when inserting a post mention 2021-05-02 21:37:31 +01:00
flarum-bot
83ed624223 Bundled output for commit e407c66784 [skip ci] 2021-04-21 09:59:51 +00:00
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
Sami Mazouz
057517688c Add integration tests (#66) 2021-04-13 22:27:42 +01:00
Alexander Skvortsov
cd3934e358 Use RequestUtil to access actor 2021-04-08 00:03:18 -04:00
Sami Mazouz
46aabd2ae5 Eager load mentionedBy and only missing relations (#64) 2021-03-25 15:37:47 +01:00
Daniel Klabbers
613664525d Release v0.1.0-beta.16 2021-03-15 12:11:51 +01:00
Alexander Skvortsov
b922257468 Use non-deprecated translator interface 2021-03-13 17:10:23 -05:00
Charlie
23c03e058a change category (#62) 2021-03-08 14:21:21 -05:00