matrix-react-sdk icon indicating copy to clipboard operation
matrix-react-sdk copied to clipboard

Implement a message for user account suspension, as per MSC3823.

Open Yoric opened this issue 2 years ago • 11 comments

Users may have their account temporarily suspended from a homeserver, e.g. due to ToS violations. This prevents them from sending new messages but not from reading messages or redacting their own messages.

This patch displays an error message comparable to "some of your messages have not been sent".

See https://github.com/matrix-org/synapse/pull/12845 for more details.


Here's what your changelog entry will look like:

✨ Features

  • Implement a message for user account suspension, as per MSC3823. (#8722). Contributed by @Yoric.

Yoric avatar May 31 '22 09:05 Yoric

Unfortunately, I have no idea how to write a test for such a feature.

Yoric avatar May 31 '22 09:05 Yoric

The test failure seems to be a timeout in unrelated code.

Yoric avatar May 31 '22 11:05 Yoric

For testing: a cypress test would be appreciated. It allows you to run a Synapse and call endpoints, which should be enough to trigger and test suspension.

turt2live avatar May 31 '22 21:05 turt2live

Matching screenshot: Screenshot from 2022-06-02 07-53-31

Yoric avatar Jun 02 '22 05:06 Yoric

Also, test added.

Yoric avatar Jun 02 '22 07:06 Yoric

@Yoric that screenshot looks rather broken

image

It is likely even worse with different scaling/font settings.

t3chguy avatar Jun 02 '22 07:06 t3chguy

@Yoric that screenshot looks rather broken

image

It is likely even worse with different scaling/font settings.

Yes, I believe that this is what what the status bar currently looks like on 1000x660 (the default size for cypress), even without my patch.

Here's a screenshot with a more reasonable 1280x1024: Screenshot from 2022-06-02 09-58-40

Yoric avatar Jun 02 '22 07:06 Yoric

The cypress test passes locally but fails with the following error message in CI:

Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_00e45d6c-6a29-4cbf-a707-3052823681c4/7b22363b-0b56-4817-8fec-0cd31a12eaad.tar.gz. return code: 2.

I don't have the authorization to relaunch tests.

Yoric avatar Jun 02 '22 08:06 Yoric

Here's a screenshot with a more reasonable 1280x1024:

Until you open the right panel, surely?

t3chguy avatar Jun 06 '22 06:06 t3chguy

Here's a screenshot with a more reasonable 1280x1024:

Until you open the right panel, surely?

You are right.

Note that the problem already shows up prior to this patch, though.

Screenshot from 2022-06-06 09-47-17

I would suggest fixing this for good in a followup issue, as I clearly do not have a fine enough understanding of the CSS of Element Web for this purpose, plus this feels like a bit too much scope extension for this PR.

Yoric avatar Jun 06 '22 07:06 Yoric

Note: Latest cypress error seems to be a timeout in unrelated code.

Yoric avatar Jun 06 '22 09:06 Yoric

It looks like progress here has halted for now. Thank you for your work on this. The code and the Netlify build will continue to exist, so this can still be used to validate the MSC if needed, but I'm going to close the PR until it's being actively worked on.

andybalaam avatar Nov 09 '23 11:11 andybalaam