Warn people against requesting empty state keys by accident

This commit is contained in:
Mark Haines 2017-03-06 14:26:32 +00:00
parent 839c993725
commit cce5af46ba

View file

@ -9,8 +9,14 @@ import (
)
// StateKeyTuple is a pair of an event type and state_key.
// This is used when requesting parts of the state of a room.
type StateKeyTuple struct {
EventType string
// The "type" key
EventType string
// The "state_key" of a matrix event.
// The empty string is a legitimate value for the "state_key" in matrix
// so take care to initialise this field lest you accidentally request a
// "state_key" with the go default of the empty string.
EventStateKey string
}