getMissedCallNotificationContent static method
Implementation
static Future<List<String>> getMissedCallNotificationContent(
bool isOneToOneCall,
String userJid,
String groupId,
String callType,
List<String> userList) async {
String messageContent;
StringBuffer missedCallTitle = StringBuffer();
missedCallTitle.write("You missed ");
if (isOneToOneCall && groupId.isEmpty) {
if (callType == CallType.audio) {
missedCallTitle.write("an ");
} else {
missedCallTitle.write("a ");
}
missedCallTitle.write(callType);
missedCallTitle.write(" call");
messageContent = await getDisplayName(userJid);
} else {
missedCallTitle.write("a group $callType call");
if (groupId.isNotEmpty) {
messageContent = await getDisplayName(groupId);
} else {
messageContent = await getCallUsersName(userList);
}
}
return [missedCallTitle.toString(), messageContent];
}