Git Product home page Git Product logo

Comments (20)

jtdaugherty avatar jtdaugherty commented on July 21, 2024 1

@taratatach If matterhorn can tell that a link is to a post, then it will always fetch that post and put it into the history. (It must do this since the next step is to select the post in selection mode.)

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

If this is happening, it's because Matterhorn doesn't recognize one of those URLs as a post link for your server for some reason. Are the URLs you included above both representative examples, with the first one being an example that doesn't get recognized as a post link?

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

(By which I mean examples of actual URLs from your server.)

from matterhorn.

setharnold avatar setharnold commented on July 21, 2024

Yes, I copied both of those examples without changing or obfuscating either of them. They both look like what I expect and both of them take me to the intended conversation when I load them with Firefox.

Now that I load them both back-to-back, I see one is to a 'private channel' and one is to a 'public channel'. (None of our channels are fully public, we require authenticating with our SSO system to connect. But we do use the private channels to limit visibility of conversations.)

Thanks

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

Was the user account that had this problem a member of the private channel at the time this behavior was observed?

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

(And was it the private channel's link that was misbehaving?)

from matterhorn.

setharnold avatar setharnold commented on July 21, 2024

Unfortunately, I just came across another link that renders as the URL and loads in Firefox that goes to a public channel. (I even knew two examples wasn't enough to draw a conclusion but wanted to believe. sigh.)

btw, [https://chat.canonical.com/canonical/pl/pi1kfyhhetd33rfaek5jfrnifr](https://chat.canonical.com/canonical/pl/pi1kfyhhetd33rfaek5jfrnifr)

Renders as:

btw, <<https://chat.canonical.com/canonical/pl/pi1kfyhhetd33rfaek5jfrnifr>>

I believe all the people who posted the links were members of the channels at the time that they posted the links.

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

(Actually, channel membership won't matter at all. I thought it might, but Matterhorn doesn't even know which channel a post is in, just by looking at the post link. It only identifies a post link by looking at the URL structure.)

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

Another question: when these links were not being rendered as expected, what was the Mattermost team that contained the channel in which the broken links were rendered? (The team in the URL is canonical.)

from matterhorn.

setharnold avatar setharnold commented on July 21, 2024

I only connect to one Mattermost server, run by Canonical. As far as I know, all the channels are part of the Canonical team.

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

To confirm explicitly, then, matterhorn is not showing a team list at the top of the screen, then, right? For example, I'm on two Mattermost "teams" so the first line in my matterhorn UI says Teams (1/2): when the first team is selected.

from matterhorn.

setharnold avatar setharnold commented on July 21, 2024

Correct:

   Team: Canonical
    + @seth-arnold
      Unread: 16
▲ ──Public Channels*──

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

Okay, thanks. Just for your awareness: a "team" is a group of channels and users within a server, and every server has at least one team. You are currently a member of just one, although your server could have others that you aren't a member of. But in this case it doesn't matter because all of the post links you showed are links to posts on channels in your team, so they should be rendered as post links. (If Matterhorn sees a link to a post in a different team, it won't render it as a post link since that can't necessarily be treated as such.)

This is a bit of a puzzle. I'll think about it some more and see if I have more questions for you, but right now I don't have any theories about why you're seeing this behavior.

from matterhorn.

taratatach avatar taratatach commented on July 21, 2024

Hi.

I'm facing the same issue.

I wonder if this could happen when the linked message is pretty old and not part of the messages in Matterhorn's memory (or recent history).

from matterhorn.

setharnold avatar setharnold commented on July 21, 2024

In #816 I pointed out that my client had two connections to my company's mattermost instance via Kubernetes and loadbalancers. Earlier, @jtdaugherty said:

it's because Matterhorn doesn't recognize one of those URLs as a post link for your server for some reason.

This is a mighty big leap to make, but what are the chances that the "post link for your server" is doing some IP-address based equality checks rather than DNS-name based equality checks or making an API call to retrieve the contents of the link and inspect the data for a team uuid or something?

In which case, there might not be any pattern to which links are considered on the same server and which are considered to be on another server, because the getaddrinfo() call (or whatever API is actually used) might be returning an IP address from the list at random:

$ host chat.canonical.com
chat.canonical.com is an alias for prod-is.ps5.kubernetes-ingress.canonical.com.
prod-is.ps5.kubernetes-ingress.canonical.com has address 185.125.189.99
prod-is.ps5.kubernetes-ingress.canonical.com has address 185.125.189.101
prod-is.ps5.kubernetes-ingress.canonical.com has address 185.125.189.100

Thanks

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

@setharnold post links are detected solely by inspecting the string of the URL that mentions the post (here). No API calls or DNS resolutions are involved.

from matterhorn.

setharnold avatar setharnold commented on July 21, 2024

A leap too far! thanks again for indulging my curiosity @jtdaugherty.

from matterhorn.

setharnold avatar setharnold commented on July 21, 2024

Is there a way I can force matterhorn to load an URL? eg, a recent message from a colleague renders like this:

[01:11:46] NNNN:
             lorem ipsum sic semper fudge
             <https://chat.canonical.com/canonical/pl/zikxg3g9wtb3bywic58ebgrmaw>

The built-in url opening goes through xdg-open to firefox which loads that link in the web interface. What I would love is some way to go to this conversation within matterhorn directly. For example, maybe /join https://chat.canonical.com/canonical/pl/zikxg3g9wtb3bywic58ebgrmaw or /goto https://chat.canonical.com/canonical/pl/zikxg3g9wtb3bywic58ebgrmaw or something similar.

Does this feature exist? If not, would you like a new issue for it?

Thanks

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

Is there a way I can force matterhorn to load an URL?

Not right now. It can only open URLs that appear in messages.

What I would love is some way to go to this conversation within matterhorn directly.

In general, Matterhorn will do this if you open a post URL. If you open a post URL and it uses the open command as you describe, then that's an instance of the bug that this ticket is about, and I don't have any leads right now on why that would be happening. If Matterhorn uses the open command to open the URL, then for some reason it has concluded that the URL is not a post URL.

I'll update Matterhorn so that it logs some of the information it's using to do post URL matching. Perhaps that way we can see why it isn't properly identifying post URLs.

from matterhorn.

jtdaugherty avatar jtdaugherty commented on July 21, 2024

There's now a patch on develop that will log the team URL data that Matterhorn uses to do post URL identification. For anyone here with post URL loading problems, if you want to build from source, then running the develop build with logging enabled will result in a log that contains lines like

[2024-02-21 03:05:03.046352 UTC] [LogGeneral] [*] Team base URL for team ID TI {unTI = Id {unId = "3k4349mapfyh88hrxzprbm3yiw"}}: TeamBaseURL (TeamURLName "foo") (ServerBaseURL "https://mattermost.example.com/")
[2024-02-21 03:05:03.046354 UTC] [LogGeneral] [*] Team base URL for team ID TI {unTI = Id {unId = "5k97pnsfjpbrbenrceggq49g8h"}}: TeamBaseURL (TeamURLName "bar") (ServerBaseURL "https://mattermost.example.com/")

If you end up doing that, please post that here along with one of the post URLs you're using that isn't working.

from matterhorn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.