fix(chat): support body and content fields in world and DM chat messages; feat(audio): add sound toggle switch and mute controls
checkpoint / checkpoint (push) Successful in 6m11s
checkpoint / checkpoint (push) Successful in 6m11s
This commit is contained in:
@@ -150,7 +150,7 @@ static func get_dm_messages(api: Node, conversation_id: int, before_id: int = 0,
|
||||
return await api.request(HTTPClient.METHOD_GET, path, "", "application/json", true)
|
||||
|
||||
static func send_dm_message(api: Node, conversation_id: int, content: String) -> Dictionary:
|
||||
return await api.request(HTTPClient.METHOD_POST, "/api/chat/dm/conversations/%d/messages" % conversation_id, JSON.stringify({"content": content}), "application/json", true)
|
||||
return await api.request(HTTPClient.METHOD_POST, "/api/chat/dm/conversations/%d/messages" % conversation_id, JSON.stringify({"body": content, "content": content}), "application/json", true)
|
||||
|
||||
static func get_world_chat_messages(api: Node, world_id: int, before_id: int = 0, limit: int = 50) -> Dictionary:
|
||||
var path := "/api/chat/world/%d/messages?limit=%d" % [world_id, limit]
|
||||
@@ -159,7 +159,7 @@ static func get_world_chat_messages(api: Node, world_id: int, before_id: int = 0
|
||||
return await api.request(HTTPClient.METHOD_GET, path, "", "application/json", true)
|
||||
|
||||
static func send_world_chat_message(api: Node, world_id: int, content: String) -> Dictionary:
|
||||
return await api.request(HTTPClient.METHOD_POST, "/api/chat/world/%d/messages" % world_id, JSON.stringify({"content": content}), "application/json", true)
|
||||
return await api.request(HTTPClient.METHOD_POST, "/api/chat/world/%d/messages" % world_id, JSON.stringify({"body": content, "content": content}), "application/json", true)
|
||||
|
||||
static func get_room_chat_messages(api: Node, room_id: String, before_id: int = 0, limit: int = 50) -> Dictionary:
|
||||
var path := "/api/chat/room/%s/messages?limit=%d" % [room_id.uri_encode(), limit]
|
||||
@@ -168,7 +168,7 @@ static func get_room_chat_messages(api: Node, room_id: String, before_id: int =
|
||||
return await api.request(HTTPClient.METHOD_GET, path, "", "application/json", true)
|
||||
|
||||
static func send_room_chat_message(api: Node, room_id: String, content: String) -> Dictionary:
|
||||
return await api.request(HTTPClient.METHOD_POST, "/api/chat/room/%s/messages" % room_id.uri_encode(), JSON.stringify({"content": content}), "application/json", true)
|
||||
return await api.request(HTTPClient.METHOD_POST, "/api/chat/room/%s/messages" % room_id.uri_encode(), JSON.stringify({"body": content, "content": content}), "application/json", true)
|
||||
|
||||
static func report_message(api: Node, message_id: int, conversation_type: String, reason: String, context_text: String = "") -> Dictionary:
|
||||
var payload := {
|
||||
|
||||
Reference in New Issue
Block a user