Home › Forums › BP Better Messages › API insert message in chat › Reply To: API insert message in chat
ok, short update, due to other priorities put this on hold for a while. Via the endpoints from buddypress managed to add ads to the group chats every so many seconds. works great. its still pretty unclear to me what the user_id, thread_id, etc actually mean for better messages, can’t seem to confirm it has something to do with which chatroom, just cant get my finger behind it, can you confirm what the parameters mean in context of better messages?
Current code works but really rough
Message p = new Message
recipients = 1,
sender_id = item.UserId, //, //1
Id = 1, // 1, // user id??
thread_id = 0, //??
message = HTMLTools.CreateChatImgTag(Media.Url, “”)
var Chats = await wpclient.CustomRequest.UpdateAsync<Message, dynamic>(“buddypress/v1/messages”, p);