mirror of https://github.com/velour/catbase.git
Mix username and user since slack sucks
This commit is contained in:
parent
1874f43e6c
commit
38a321f231
|
@ -185,6 +185,11 @@ func (s *Slack) buildMessage(m slackMessage) msg.Message {
|
||||||
text = text[3:]
|
text = text[3:]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u := s.getUser(m.User)
|
||||||
|
if m.Username != "" {
|
||||||
|
u = m.Username
|
||||||
|
}
|
||||||
|
|
||||||
// I think it's horseshit that I have to do this
|
// I think it's horseshit that I have to do this
|
||||||
ts := strings.Split(m.Ts, ".")
|
ts := strings.Split(m.Ts, ".")
|
||||||
sec, _ := strconv.ParseInt(ts[0], 10, 64)
|
sec, _ := strconv.ParseInt(ts[0], 10, 64)
|
||||||
|
@ -194,7 +199,7 @@ func (s *Slack) buildMessage(m slackMessage) msg.Message {
|
||||||
return msg.Message{
|
return msg.Message{
|
||||||
User: &user.User{
|
User: &user.User{
|
||||||
ID: m.User,
|
ID: m.User,
|
||||||
Name: m.Username,
|
Name: u,
|
||||||
},
|
},
|
||||||
Body: text,
|
Body: text,
|
||||||
Raw: m.Text,
|
Raw: m.Text,
|
||||||
|
|
Loading…
Reference in New Issue