Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show files in the file panel with a truthy url #6250

Open
turt2live opened this issue Feb 25, 2018 · 12 comments
Open

Only show files in the file panel with a truthy url #6250

turt2live opened this issue Feb 25, 2018 · 12 comments
Labels
A-File-Panel Hacktoberfest Issues which are suitable for Hacktoberfest PRs: https://hacktoberfest.digitalocean.com/ Help Wanted Extra attention is needed P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@turt2live
Copy link
Member

turt2live commented Feb 25, 2018

Description

As per https://gitlab.gnome.org/GNOME/fractal/-/issues/101

... or to summarize the issue, an event like the following will appear in the file panel:

  "content": {
    "body": "Ooh, Fractal has an icon in the Papirus icon pack",
    "url": null,
    "msgtype": "m.text",
    "formatted_body": null,
    "format": null
  },

Version information

  • Platform: web (in-browser)
  • Browser: Chrome 64
  • OS: Windows 10
  • URL: riot.im/develop
@uhoreg
Copy link
Member

uhoreg commented Feb 28, 2018

see also #4480 and #5076.

@lampholder lampholder added T-Defect ui/ux P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround A-File-Panel Help Wanted Extra attention is needed labels Feb 28, 2018
@t3chguy
Copy link
Member

t3chguy commented Jun 16, 2018

events are indexed with whether or not they contains_url so this'll be a Synapse bug :(

@t3chguy
Copy link
Member

t3chguy commented Jun 16, 2018

https://github.com/matrix-org/synapse/blob/752b7b32ed1c33651c0c64fbbb4289c3b62ac89b/synapse/storage/events.py#L1119-L1122

it'll also need some migration magic to fix this for all existing events in db

@t3chguy
Copy link
Member

t3chguy commented Jun 16, 2018

Although according to the above code null shouldn't be true for isinstance(event.content["url"], basestring)

@t3chguy
Copy link
Member

t3chguy commented Jun 16, 2018

This seems fine, so maybe its a fixed Synapse bug:
image

@t3chguy
Copy link
Member

t3chguy commented Jun 16, 2018

weird, even though its right in the db and the filter seems fine the event is in my FilePanel
image

@t3chguy
Copy link
Member

t3chguy commented Jun 17, 2018

ah turns out it is a Synapse bug where the is_url "formula" is inconsistent between files

@t3chguy
Copy link
Member

t3chguy commented Jun 17, 2018

though as per the spec:
image
it won't exclude non-truthy but instead non-string

@t3chguy
Copy link
Member

t3chguy commented Jun 17, 2018

This is actually a weird combination of a Synapse bug and a js-sdk one.
So if the event was paginated in then the js-sdk bug would hit and otherwise the Synapse bug would hit.

@t3chguy
Copy link
Member

t3chguy commented Jun 17, 2018

though technically the matrix spec here could be understood to mean that "url": null should trip this Filter,
Synapse in 2/3 places checked whether it was a string, Dendrite does not. So its a 50/50 right now. I might write a proposal to improve contains_url to checking for a truthy string to get around this

@jryans jryans removed the Z-UI/UX label Mar 9, 2021
@kittykat
Copy link
Contributor

@turt2live What would it take to resolve this issue? To do the checks in Dendrite?

@turt2live
Copy link
Member Author

I don't think this is a dendrite issue. We should either filter it out locally, or declare it a synapse bug and move it there.

@Johennes Johennes added the Hacktoberfest Issues which are suitable for Hacktoberfest PRs: https://hacktoberfest.digitalocean.com/ label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-File-Panel Hacktoberfest Issues which are suitable for Hacktoberfest PRs: https://hacktoberfest.digitalocean.com/ Help Wanted Extra attention is needed P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

7 participants