Handle request to delete the topic {del what="topic"}. 1. If requester is the owner then it should have been handled at the hub, log an error. 2. If requester is not the owner, treat it like {leave unsub=true}.
(sess *Session, asUid types.Uid, msg *ClientComMessage)
| 3296 | // 1. If requester is the owner then it should have been handled at the hub, log an error. |
| 3297 | // 2. If requester is not the owner, treat it like {leave unsub=true}. |
| 3298 | func (t *Topic) replyDelTopic(sess *Session, asUid types.Uid, msg *ClientComMessage) error { |
| 3299 | if t.owner != asUid { |
| 3300 | return t.replyLeaveUnsub(sess, msg, asUid) |
| 3301 | } |
| 3302 | |
| 3303 | // This is an indication of a bug. |
| 3304 | logs.Err.Println("replyDelTopic called by owner (SHOULD NOT HAPPEN!)") |
| 3305 | return nil |
| 3306 | } |
| 3307 | |
| 3308 | // Delete credential |
| 3309 | func (t *Topic) replyDelCred(sess *Session, asUid types.Uid, authLvl auth.Level, msg *ClientComMessage) error { |
no test coverage detected