(elems []IMessageElement, t ElementType)
| 631 | } |
| 632 | |
| 633 | func ElementsHasType(elems []IMessageElement, t ElementType) bool { |
| 634 | for _, elem := range elems { |
| 635 | if elem.Type() == t { |
| 636 | return true |
| 637 | } |
| 638 | } |
| 639 | return false |
| 640 | } |
| 641 | |
| 642 | func PackElementsToBody(msgElems []IMessageElement) (msgBody *message.MessageBody) { |
| 643 | msgBody = &message.MessageBody{ |