vavadiyahiren/xmpp_plugin

MessageChat *customText* returns empty string

Closed this issue · 4 comments

I have used sendCustomMessage to add a custom message in message request.
I can see the value in the XMPP logs but unfortunately, the MessageChat in void onChatMessage(MessageChat messageChat) returns empty customText.

you can edit package according to yourself downloading code from GitHub and import it from your local.

I edited xmpp_plugin.dart file like that:

Future sendCustomMessage(String toJid, String body, String id, String customString, int time) async {
final params = {
"to_jid": toJid,
"body": body,
"id": id,
"customText": customString,
"time": time.toString(),
};
printLogForMethodCall('send_message', params);
final String status = await _channel.invokeMethod('send_custom_message', params);
return status;
}

@ismailgzn I don't think so customisation required but let me investigate the case ?

@aarjan Can you please paste your code snippet here and also the logs which is receiving on your end ?

Do also confirm that are you using on android or ios ?

Yes I am testing on Android.

@aarjan I tested with the example apps and it works fine can you please send more details how exactty you are using ?