lib/chatrix/api/rooms.rb
# Sends a state event to a room, with an optional state key.
# @param room [String] The room to send the event to.
# @param type [String] The event type to send.
# @param content [Hash] The content to set for the event.
# @param key [String,nil] Optional `state_key` to use.
# @return [String] The event ID for the sent event.
Sends a state event to a room, with an optional state key.
Sends a state event to a room with an optional state key .
def send_state(room, type, content, key = nil)
        path = "/rooms/#{room}/state/#{type}"
        path += "/#{key}" if key
        make_request(:put, path, content: content)['event_id']
      end
def send_state ( room , type , content , key = nil ) path = "/rooms/#{room}/state/#{type}" path += "/#{key}" if key make_request ( :put , path , content : content ) [ 'event_id' ] end
Sends a state event to a room, with an optional state key.
Sends a state event to a room with an optional state key .
The event ID for the sent event.
The event ID for the sent event .
String
room
The room to send the event to.
The room to send the event to .
type
The event type to send.
The event type to send .
content
The content to set for the event.
The content to set for the event .
key
Optional `state_key` to use.
Optional ` state_key ` to use .