- October 24, 2021 at 7:42 pm #11841
Was wondering if somebody has example of posting message in a specific chat? I like to insert ads now and than to get funding for the websocket license.
Understand that it should support the buddypress messaging api, anyone got example? preferably in C# but any language will do. Highly appreciated.October 24, 2021 at 7:49 pm #11844WordPlus SupportKeymaster
This is great example how to send messages with function:
Thanks!October 24, 2021 at 7:58 pm #11845
Again stunned by your support however how to put this message in a specific chat window? should i use thread id for that or something?
DennisJuly 17, 2022 at 12:57 pm #12879
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);
- You must be logged in to reply to this topic.