isVoteMessage static method
Implementation
static bool isVoteMessage(V2TimMessage message) {
bool isVoteMessage = false;
V2TimCustomElem? custom = message.customElem;
if (custom != null) {
String? data = custom.data;
if (data != null && data.isNotEmpty) {
try {
Map<String, dynamic> mapData = json.decode(data);
if (mapData["businessID"] == "group_poll") {
isVoteMessage = true;
}
} catch (err) {
// err
}
}
}
return isVoteMessage;
}