(ctx context.Context, userId, msgType, body, outType, roomId string)
| 98 | } |
| 99 | |
| 100 | func SendRoomNotice(ctx context.Context, userId, msgType, body, outType, roomId string) error { |
| 101 | apiClient := GetHttpClient(time.Minute * 1) |
| 102 | defer apiClient.CloseIdleConnections() |
| 103 | req := sendNoticeRequest{ |
| 104 | UserID: userId, |
| 105 | Content: struct { |
| 106 | MsgType string `json:"msgtype,omitempty"` |
| 107 | Body string `json:"body,omitempty"` |
| 108 | }(struct { |
| 109 | MsgType string |
| 110 | Body string |
| 111 | }{MsgType: msgType, Body: body}), |
| 112 | Type: outType, |
| 113 | StateKey: "", |
| 114 | RoomId: roomId, |
| 115 | } |
| 116 | res := struct { |
| 117 | EventId string `json:"event_id,omitempty"` |
| 118 | }{} |
| 119 | return PostJSONNoSpan(ctx, &apiClient, LocalServerUrl+RoomMsgNoticePath, req, &res) |
| 120 | } |
nothing calls this directly
no test coverage detected