Method: MatrixSdk::Protocols::CS#set_room_join_rules

Defined in:
lib/matrix_sdk/protocols/cs.rb

#set_room_join_rules(room_id, join_rule, **params) ⇒ Response

Sets the join rules for a room

Parameters:

  • room_id (MXID, String)

    The room ID to work on

  • join_rule (String, Symbol)

    The new join rule setting (Currently only public and invite are implemented)

  • params (Hash)

    Extra options to set on the request, see #send_state_event

Returns:

  • (Response)

    The resulting state event

See Also:



679
680
681
682
683
684
685
# File 'lib/matrix_sdk/protocols/cs.rb', line 679

def set_room_join_rules(room_id, join_rule, **params)
  content = {
    join_rule: join_rule
  }

  send_state_event(room_id, 'm.room.join_rules', content, params)
end