buildInviteMemberNotification static method
Future<String>
buildInviteMemberNotification(
- String tid,
- String fromAccId,
- NIMMessageNotificationAttachment attachment
)
Implementation
static Future<String> buildInviteMemberNotification(String tid,
String fromAccId, NIMMessageNotificationAttachment attachment) async {
var fromName = await getTeamMemberDisplayName(tid, fromAccId);
var memberNames = await buildMemberListString(tid, attachment.targetIds!,
fromAccount: fromAccId, needTeamNick: false);
var team = (await NimCore.instance.teamService
.getTeamInfo(tid, NIMTeamType.typeNormal))
.data;
if (team != null && !getIt<TeamProvider>().isGroupTeam(team)) {
return S.of().chatAdviceTeamNotifyInvite(fromName, memberNames);
} else {
return S.of().chatDiscussTeamNotifyInvite(fromName, memberNames);
}
}