[Added] support for FullName, FirstName, LastName, and UserName for Mattermost bridge#194
[Added] support for FullName, FirstName, LastName, and UserName for Mattermost bridge#194AlexanderShK wants to merge 11 commits intomatterbridge-org:masterfrom
Conversation
update variables added UseFullName and UseLastName for Mattermost
Add ability to use FullName, FirstName, LastName, NickName or UserName(if neither is set) as nick for Mattermost
Added examples NickName/FullName/FirstName/LastName/UserName for Mattermost
|
Hmm, since Matterclient is a first party library by the original Matterbridge dev, does this mean you are willing to maintain this library as a fork from now on? |
|
Idk, to be honest, I'm not sure I have enough skills for this. After all, I've never been a maintainer before. |
|
Hypothetically speaking, I think I could give it a try. And if I mess things up, you can always get rid of me afterwards. ¯_(ツ)_/¯ |
|
Well, we don't really have other volunteers and I doubt the original library will be fixed when Mattermost changes anything. |
|
Anyways, if you agree to maintain the library and bridge, please change it in this PR. Also make sure to add yourself as a maintainer to the in-repo documentation, and update the documentation, example config and changelog. Thanks a lot 👍 |
|
Understood. Could you please fork matterclient under the matterbridge-org organization? I could then open the necessary pull request there and update this patch to be based on it. |
|
https://github.com/matterbridge-org/matterclient Please also add a readme with the PR. |
|
Created MR in matterclient repo. Also, before moving this PR from the Draft, will need to create the first tag/release of matterclient (v0.0.1?) after #1 get merged. |
|
Great. I added you as a member with write access to that repo. If that isn't sufficient to tag a release, please let me know and I will upgrade it to management permissions. |
|
Go really dislikes if-else, switching it to a switch once I get a spare minute |
Rewritten to a more preferable style for GO
|
Fixed |
|
Hello, thanks for the contribution! Just wondering if so many binary settings is the correct approach for string formatting the nick. Maybe we could add a |
|
Actually, that sounds like a good idea. Originally, I did it this way because useUserName already existed and was being used for Matrix and Discord. Telegram already had its own useFirstName, and Mattermost had UseNickName. So I figured this was a somewhat established pattern across the different platforms in the config, I decided to keep things coherent. |
This is my patch, rebased on top of your fork that added support for FullName, FirstName, LastName, and UserName (instead of only Nickname and FirstName).
For it to work, you will also need to apply the corresponding changes to matterclient (https://github.com/AlexanderShK/matterclient). I left the module link and checksum in go.sum and go.mod unchanged in the public repository (they would need to be updated for your fork anyway), but the patch itself is fully available and ready.