Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Mentions doesn't work #8

Open
Laxen opened this issue Oct 27, 2018 · 10 comments
Open

Mentions doesn't work #8

Laxen opened this issue Oct 27, 2018 · 10 comments

Comments

@Laxen
Copy link

Laxen commented Oct 27, 2018

Hello 👋
I'm doing some work on teams-for-linux but since upstream seems abandoned I've decided to work on this fork instead.

Problem
It is impossible to mention someone (type @ and then their name) and write a message directly after the mention.

How to reproduce

  1. Open Teams and open a chat with at least one other user.
  2. Type @ and the name of a user in your chat. Their name should appear in blue in your chat box.
  3. Press <Space> like you would if you were typing a message to that person.
  4. About 0.5 seconds after <Space> is pressed the color of the name will turn into regular text color.
  5. Press <Enter> to send the message. Notice that it is no longer a mention, just regular text.

Comments
This is the same for both the upstream teams-for-linux and Rambox. The issue occurs only when using Edge in the user agent string. If Edge is removed from the user agent string mentions will work again, but then voice calls will stop working...

Potential solution
Me and @brad have been discussing in this pull request and we've come up with a solution that works for Rambox. I've tried this solution in upstream teams-for-linux too and it works perfectly. However it doesn't work on this fork and I've come to the conclusion that it breaks when updating Electron to 3.0.0 or later.

Does anyone have any idea of why this breaks when using Electron 3.0.0 or later?

@maximbaz
Copy link

This issue is super-annoying, I agree. For reference, the workaround was to adjust User-Agent only after DOM is ready.

@IsmaelMartinez
Copy link

Hi @Laxen , @jamie is working on a rewrite. While that happens feel free to add this changes in the fork that I have (its closer to the upstream project written in plain JavaScript)

I have added other stuff to it and I am supporting the branch (and plan to help with the rewrite once there is a plan in place). Jamie is aware of this.

I am on holidays at the moment but will be back soon and plan to work on that fix and a few more. Mentions works fine on Chrome browser... But then you don't have video.

@IsmaelMartinez
Copy link

IsmaelMartinez commented Oct 28, 2018

Ok, I tried to fix it but it doesn't seem to be working (or only works sometimes what is even more annoying).

I will see if I can get some time this week and try to fix it. I tried adding the userAgent to the DOMContentLoaded event, but it only works sometimes... I think it might be a timing issue

@Laxen
Copy link
Author

Laxen commented Oct 29, 2018

Hi @IsmaelMartinez! Yes as I said I can't get it to work at all on Electron 3.0.0 or later, but on 2.0.X it works perfectly. Your branch is also on 3.0.0 so it probably has the same problem. Did you manage to get it to work sometimes on 3.0.0? If so it might be a very strange timing problem as you said.

@IsmaelMartinez
Copy link

Hi @Laxen

I think I have seen it working sometimes by setting the userAgent to chrome on start and then on DOMContentLoaded setting it to the edge userAgent string, but I will try again once I get some more time (it was fairly late last night and fairly early this morning so it might just be a red herring)

If worse comes to worst, I am happy to downgrade to version 2.x.x and then try it again when version 4.x.x is available. Feel free to do a pull request if you get it working (even if with version 2.x.x if the rest seems to be also working fine).

I am fairly busy trying to fix the other wee things and with life in general, so any help will be more than appreciated.

Thanks!

@IsmaelMartinez
Copy link

Yeah, it did seem it is a timing issue and also the userAgent used for edge. It seems like it works for version 12.246 but not the version 17 (who knows why).

I will be testing it tonight and tomorrow and do a pre-release. I will appreciate if you guys can also test it as it gives me more confidence.

Thanks again for the help/tip! This client starts to feel usable and stable. :)

@IsmaelMartinez
Copy link

IsmaelMartinez commented Nov 1, 2018

Hi @Laxen and @maximbaz,

I have test the solution with a business and hotmail accounts and it seems to work.

The release is 0.1.8.

I will appreciate if you could confirm if it works and, if you could let me know either way in here or in IsmaelMartinez/teams-for-linux#10.

Thanks!

@maximbaz
Copy link

maximbaz commented Nov 1, 2018

Just tried your fork, here are my first impressions:

Pros:

  • mentions work, yay!
  • desktop notifications have photo of the person who wrote the message, super useful for group chats!

Cons:

  • restarting app requires sign in
  • for every message I now get two desktop notifications, one of them is useless:
    image

Signing in every time I restart the app is a serious downside for me, I'd probably prefer to stay with broken mentions than with "forgetful" app.

@IsmaelMartinez
Copy link

@maximbaz , if you want to persist your settings you can start the app with teams --partition persist:teams-for-linux. I did disable the persist because it was causing other problems when changing the user agent, but I will reintroduce it as default for version 0.1.9

I am not sure how you are getting 2 notifications (1st time I see that). What version of Linux are you running teams on? Could you add this as a bug (if it is to be considered a bug) in my repo? Thanks

@maximbaz
Copy link

maximbaz commented Nov 1, 2018

Persist helps, I haven't seen any issues using it so far. Created the bug in your repo regarding the double notifications. This now looks very promising, thanks for your work 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants