This used to work, but recently on trying to send a PM using the DiscourseApi I keep getting: DiscourseApi::UnprocessableEntity ({"action"=>"create_post", "errors"=>["You must select a valid user."]})
but the user is valid (and the same thing happens no matter which username I try).
Via a console using the Discourse gem:
user = "MyUserName"
client = DiscourseApi::Client.new("https://myforum.com")
client.api_key = "h03873hxjd734i4hdjdudje94udjdjdeje83483483jdjdjdjed84u34e"
client.api_username = "ForumUserName"
client.create_private_message(
title: "testing a title",
raw: "Hey this is a test",
target_usernames: user
)
Looks like a bug? (Think there was a similar bug with tags a while back : /)