powered by Jive Software

Can I stop specific message stanza store into ofMessageArchive table using openfire setting

Note: If not possible then i need develop following functionality

During Group chat multiple user typing in same group so i need status who is typing Like skype and what’s up in Android and Ios App. How i can do it…?

Example:

Group Name:- InxTeam
Number of Member:- 3

Show following message in Group

user1 is typing…in InxTeam
user2 is typing…in InxTeam

Note
This functionality done from my end but it’s way is wrong because user typing message in chat that time every character send as message stanza and store every character into ofMessageArchive Table

Example
Message:- hello

ofMessageArchive Table
Id message_stanza message time from_id to_id
1 h 12265546 inx_21@11111 grp_8@1111
2 e 12265546 inx_21@11111 grp_8@1111
3 l 12265546 inx_21@11111 grp_8@1111
4 l 12265546 inx_21@11111 grp_8@1111
5 0 12265546 inx_21@11111 grp_8@1111

hi jayram,

The way of your implementation seems wrong in this case.

It seems you are using simple text chat message to show typing of member in specific group.

could you please help me to understand why you are doing this?

If possible then attach you snippet as well only after that i can help you.

Thanks Hiren

Yes I know i’am wrong but i don’t know how can i do it.

So please How Can I know which user typing in group chat…?

Below is composing message code

public boolean sendComposingStanzaToGroupAndEvent(Composing mComposing, String strFromUser, String
strToGroup, String messageBody) {
Log.e(TAG, "sendGroupComposing: sendStanza called ##### " + mComposing.toString());

    try {


        Message mMessage = new Message(strToGroup, Message.Type.groupchat);
        mMessage.addExtension(new ChatStateExtension(mComposing.getState()));
        mMessage.setBody(messageBody);
        mMessage.setTo(strToGroup);
        mMessage.setFrom(strFromUser);
        Constant.mXMPPTCPConnection.sendStanza(mMessage);

        return true;
    } catch (SmackException.NotConnectedException e) {
        e.printStackTrace();
        return false;
    }
}

you can get the user from jid of the comopsing message packet.

from your code.

you need not to set from while sending from smack.
what are you appending in body.

Hello Hiren

In Body I passed userprofile and user_id and user_name in Body.