mirror of
https://github.com/strukturag/nextcloud-spreed-signaling.git
synced 2023-10-21 07:33:40 -05:00
Add more "String()" methods to help with debugging.
This commit is contained in:
@@ -661,6 +661,14 @@ type RoomEventServerMessage struct {
|
||||
All bool `json:"all,omitempty"`
|
||||
}
|
||||
|
||||
func (m *RoomEventServerMessage) String() string {
|
||||
data, err := json.Marshal(m)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("Could not serialize %#v: %s", m, err)
|
||||
}
|
||||
return string(data)
|
||||
}
|
||||
|
||||
const (
|
||||
DisinviteReasonDisinvited = "disinvited"
|
||||
DisinviteReasonDeleted = "deleted"
|
||||
@@ -714,6 +722,14 @@ type EventServerMessage struct {
|
||||
Message *RoomEventMessage `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
func (m *EventServerMessage) String() string {
|
||||
data, err := json.Marshal(m)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("Could not serialize %#v: %s", m, err)
|
||||
}
|
||||
return string(data)
|
||||
}
|
||||
|
||||
type EventServerMessageSessionEntry struct {
|
||||
SessionId string `json:"sessionid"`
|
||||
UserId string `json:"userid"`
|
||||
|
||||
Reference in New Issue
Block a user