()
| 266 | } |
| 267 | |
| 268 | func (r sendServerNoticeRequest) valid() (ok bool) { |
| 269 | if r.UserID == "" { |
| 270 | return false |
| 271 | } |
| 272 | if r.Content.MsgType == "" || r.Content.Body == "" { |
| 273 | return false |
| 274 | } |
| 275 | return true |
| 276 | } |
| 277 | |
| 278 | // getSenderDevice creates a user account to be used when sending server notices. |
| 279 | // It returns an userapi.Device, which is used for building the event |
no outgoing calls