alert.go 490 B

12345678910111213141516171819202122232425
  1. package server
  2. import (
  3. "github.com/mkaminski/goaim/oscar"
  4. )
  5. func NewAlertRouter() AlertRouter {
  6. return AlertRouter{}
  7. }
  8. type AlertRouter struct {
  9. }
  10. func (rt *AlertRouter) RouteAlert(SNACFrame oscar.SnacFrame) error {
  11. switch SNACFrame.SubGroup {
  12. case oscar.AlertNotifyCapabilities:
  13. fallthrough
  14. case oscar.AlertNotifyDisplayCapabilities:
  15. // just read the request to placate the client. no need to send a
  16. // response.
  17. return nil
  18. default:
  19. return ErrUnsupportedSubGroup
  20. }
  21. }