-
ok,I customized a tigase plugin to process messages sent by group chat member,But I don't know how to notify all group members after processing the message,Below is a custom plugin
@Id(Solitaire.XMLNS_SOLITAIRE_DATA) @Handles({@Handle(path = {"iq", "query"}, xmlns = Solitaire.XMLNS_SOLITAIRE_DATA)}) @Bean(name = Solitaire.XMLNS_SOLITAIRE_DATA, parent = SessionManager.class, active = true) public class Solitaire extends AnnotatedXMPPProcessor implements XMPPProcessorIfc { public static final String XMLNS_SOLITAIRE_DATA = "test:group-chat"; private static final Logger log = Logger.getLogger(Solitaire.class.getName()); @Override public void process(Packet packet, XMPPResourceConnection session, NonAuthUserRepository repo, Queue<Packet> results, Map<String, Object> settings) throws XMPPException { if (session == null || !session.isAuthorized()) { return; } if (StanzaType.get != packet.getType()) { return; } try { Element query = packet.getElemChild("query"); //Referring to the tigase example I know how to return the result to a single person,but I do not know how to notify //group members after processing messages here } catch (Exception e) { LogUtils.logExeption(log, e); } } }
I have a problem with… I created a group chat with reference to the instance of tigase-tts-ng,and send messages to groups through users1,all group members can receive messages,But I don't know how to send a message to group members after processing the message in the plugin,please give me some examples,thank you
Details (please complete the following information):