// Sender returns the User that casted the vote
970339
func (vote *UserPostCommentVote) Sender() (user *User) {
	user, _ = NewUser(vote.From)
	return
}
74974
func (lurk *UserPostLurk) Sender() (user *User) {
	user, _ = NewUser(lurk.From)
	return
}
820350
func (lock *ProjectPostLock) Sender() (user *User) {
	user, _ = NewUser(lock.User)
	return
}
1311922
func (d *frameDec) sendErr(block *blockDec, err error) bool {
	d.asyncRunningMu.Lock()
	defer d.asyncRunningMu.Unlock()
	if !d.asyncRunning {
		return false
	}

	println("sending error", err.Error())
	block.sendErr(err)
	d.decoding <- block
	return true
}
494635
func checkSender(sender *Sender) error {
	if sender.ApiKey == "" {
		return errors.New("the sender's API key must not be empty")
	}
	if sender.Http == nil {
		sender.Http = new(http.Client)
	}
	return nil
}
103875
func (s *BounceAction) SetSender(v string) *BounceAction {
	s.Sender = &v
	return s
}
544378
func (ip *Interpreter) user(args []string) {
	uid, err := ip.Backend.CreateUser(args[0], args[1])
	ip.intResponder(uid, err)
}
1152521
func (s *sender) Send(message interface{}) error {
	s.encodeLock.Lock()
	defer s.encodeLock.Unlock()
	if s.encoder == nil {
		s.buffer = bufio.NewWriter(s.stream)
		s.encoder = msgpack.NewEncoder(s.buffer)
		s.encoder.AddExtensions(s.stream.initializeExtensions())
	}

	if err := s.encoder.Encode(message); err != nil {
		return err
	}

	return s.buffer.Flush()
}
287504
func (h *logSinkHandler) sendError(ws *websocket.Conn, req *http.Request, err error) {
	// There is no need to log the error for normal operators as there is nothing
	// they can action. This is for developers.
	if err != nil && featureflag.Enabled(feature.DeveloperMode) {
		logger.Errorf("returning error from %s %s: %s", req.Method, req.URL.Path, errors.Details(err))
	}
	h.mu.Lock()
	defer h.mu.Unlock()
	if sendErr := ws.SendInitialErrorV0(err); sendErr != nil {
		logger.Errorf("closing websocket, %v", err)
		ws.Close()
	}
}
430050
func sendResponse(w http.ResponseWriter, response interface{}, status int) {
	w.Header().Set("Content-Type", "application/json; charset=utf-8")
	marshalledResponse, err := json.Marshal(response)
	if err != nil {
		w.WriteHeader(http.StatusInternalServerError)
		w.Write([]byte(fmt.Sprintf("Failed to marshal response: %v %v", response, err)))
		return
	}
	w.WriteHeader(status)
	w.Write(marshalledResponse)
}
1316178
func (lock *UserPostLock) Sender() (user *User) {
	user, _ = NewUser(lock.User)
	return
}
1035234
func (a *auther) signer() Signer {
	if a.config.Signer != nil {
		return a.config.Signer
	}
	return &HMACSigner{ConsumerSecret: a.config.ConsumerSecret}
}
1150949
func (vals *ValidatorSet) GetProposer() (proposer *Validator) {
	if len(vals.Validators) == 0 {
		return nil
	}
	if vals.Proposer == nil {
		vals.Proposer = vals.findProposer()
	}
	return vals.Proposer.Copy()
}
757868
func forwarder(fromSock Socket, toSock Socket) {
	for {
		m, err := fromSock.RecvMsg()
		if err != nil {
			// Probably closed socket, nothing else we can do.
			return
		}

		err = toSock.SendMsg(m)
		if err != nil {
			return
		}
	}
}
841145
func (vote *ProjectPostVote) Sender() (user *User) {
	user, _ = NewUser(vote.From)
	return
}
1158952
func (post *UserPost) Sender() *User {
	user, _ := NewUser(post.NumericSender())
	return user
}
322425
func (c *RemindersAddCall) User(user string) *RemindersAddCall {
	c.user = user
	return c
}