-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes for Usability #285
Conversation
dgruss
commented
Jul 14, 2020
- Changed MsgUser() to take a message type: Messages now use irc.NOTICE / irc.ERROR unless they are irc.PRIVMSG to be closer to a regular IRC server, creating a more smooth user experience
- Message Playback is disabled for anything older than 24h (fixes I am constantly recieving old backlog #245 for me)
- Take messages to "nickserv" for authentication as well
- If message could not be sent, retry once per second until it works (fixed a bug for me where sent messages never arrived in mattermost)
mm-go-irckit/mmuser.go
Outdated
@@ -237,11 +237,13 @@ func (u *User) addUserToChannelWorker(channels <-chan *model.Channel, throttle < | |||
for _, post := range strings.Split(p.Message, "\n") { | |||
if user, ok := u.mc.Users[p.UserId]; ok { | |||
date := ts.Format("2006-01-02") | |||
if ((time.Now()-ts)/int64(time.Millisecond)) < 86400 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit arbitrary - would it be possible to make this configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be configurable for sure.
If this fixes linked issue (#245) I am pretty sure that it's actually more like side effect than proper fix.
u.MsgUser(toUser, "login OK") | ||
if u.Credentials != nil && u.Token != "" { | ||
u.MsgUser(toUser, "token used: "+u.Token) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to keep those messages, what is your reasoning to remove those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the login OK since there is an automatic disconnect from the server now anyways if the login is not OK.
lines 88-90 I'm not sure anymore, might have been an accident...
I fully agree ;)
|
Are you willing to rebase this ? :/ |
closing as no response and outdated |