42wim / matterircd

Connect to your mattermost or slack using your IRC-client of choice.
MIT License
294 stars 60 forks source link

Topic edit cannot cope with lack of permission #294

Closed guilhermepiccoli closed 4 years ago

guilhermepiccoli commented 4 years ago

If the IRC user (running matterircd) has no privileges to change a channel topic but tries to change that on IRC, for that user the perception is that topic was changed in IRC, but in Mattermost it isn’t - a message like this shows in matterircd logs: [51111] DEBUG matterclient: updating channelheader "715zuihufid6dcfb8p77g9a8pc", "NEWTOPIC" [51111] ERROR matterclient: : You do not have the appropriate permissions.,

I guess we could validate the permission first, and if it's not allowed, just return some error and doesn't allow the IRC user to have the impression the topic changed.

Thanks!

guilhermepiccoli commented 4 years ago

Reproduced on master, at 6715b16d62 (2020-08-11).

42wim commented 4 years ago

fixed in master

guilhermepiccoli commented 4 years ago

Thanks a lot, tested and it's working as expected!