mobitel-ltd / jira-to-matrix

JIRA to Matrix bot
32 stars 10 forks source link

Option to invite users with lowercase as name #159

Closed enannos closed 5 years ago

enannos commented 5 years ago

Hi again,

we have a problem when a new project is created. Our matrix server runs with the mxisd plugin for Active Directory authentification.

The problem is, the users are then parsed in Matrix as, for example, @max.moritz:matrix.org (all lowercase). But in Jira(where we also use AD authentication), the invitaions are sent to riot through your bridge like @Max.Moritz:matrix.org (this comes from Jira-we use also AD authentication.

The Matrix server cannot ofcourse find the user and invites an unknown user.

Is there a way to convert the invitation username to lowercase and then invite the users into the room?

Thanks

grigori-gru commented 5 years ago

Hello! Sorry to keep you waiting. All users in Matrix should be in lower case, but in Jira in your case they are Upper case, yes? You just want to parse they names to be in lower case?

enannos commented 5 years ago

Hi Grigory,

no problem :) .This is exactly what I want to do. I think I found a workaround by changing in the src/bot/actions/invite-new-members.js the following line:

await chatApi.invite(roomId, userID.toLowerCase());

It now seems to work and I think that's all that is needed. Do I need to change something else also?

grigori-gru commented 5 years ago

Hello! I've done this fix for you. I will close issue only after your feedback. Please send it.

https://github.com/mobitel-ltd/jira-to-matrix/pull/162

enannos commented 5 years ago

Hi and sorry for the delay,

it works! Thank you very much for your great support and efforts. :)