()
| 131 | } |
| 132 | |
| 133 | func (m *Message) GetMessageType() MessageType { |
| 134 | agent, err := GetAgentByID(m.Eid, m.AgentID) |
| 135 | if err != nil { |
| 136 | return MessageTypeChat |
| 137 | } |
| 138 | |
| 139 | if agent.AgentType == AgentTypeWorkflow { |
| 140 | return MessageTypeWorkflow |
| 141 | } |
| 142 | |
| 143 | return MessageTypeChat |
| 144 | } |
| 145 | |
| 146 | func (m *Message) ParseChatMessage() ([]map[string]interface{}, error) { |
| 147 | var messages []map[string]interface{} |
no test coverage detected