Merge branch 'fix_ownership'

* fix_ownership:
  fact: remove owner check from edit
This commit is contained in:
cws 2017-06-07 14:51:43 -04:00
commit b4c0f36260
1 changed files with 0 additions and 7 deletions

View File

@ -476,13 +476,6 @@ func (p *Factoid) changeFact(message msg.Message) bool {
if err != nil {
log.Println("Error getting facts: ", trigger, err)
}
if !(message.User.Admin && userexp[len(userexp)-1] == 'g') {
result = result[:1]
if result[0].Owner != message.User.Name && !message.User.Admin {
p.Bot.SendMessage(message.Channel, "That's not your fact to edit.")
return true
}
}
// make the changes
msg := fmt.Sprintf("Changing %d facts.", len(result))
p.Bot.SendMessage(message.Channel, msg)