diff --git a/lib/widgets/messages/message_invite_request.dart b/lib/widgets/messages/message_invite_request.dart index d592b5d..76de723 100644 --- a/lib/widgets/messages/message_invite_request.dart +++ b/lib/widgets/messages/message_invite_request.dart @@ -24,10 +24,23 @@ class MessageInviteRequest extends StatelessWidget { text ='''Requested invite'''; } else if (fromSelf) { //Forwarded invite request - text = '''Forwarded invite request from "${inviteInfo.usernameToInvite}" to session "${inviteInfo.forSessionName}"'''; + if(inviteInfo.response == "SendInvite") { + text = '''Granted "${inviteInfo.usernameToInvite}" invite to session "${inviteInfo.forSessionName}"'''; + } else if(inviteInfo.response == "AddAsContact") { + text = '''Adding ${inviteInfo.usernameToInvite} as a contact of the headless"'''; + } else { + //If new responses are added to the InviteRequestResponse enum. + text = '''Unknown response "${inviteInfo.response}" for invite request'''; + } } else if (inviteInfo.forSessionName != null) { //Another user requested an invite from you. - text = '''${inviteInfo.usernameToInvite} would like to join you in "${inviteInfo.forSessionName}"'''; + if (inviteInfo.requestingFromUsername.isNotEmpty) { + //User wants to invite user2 to world + text = '''"${inviteInfo.requestingFromUsername}" wants to invite "${inviteInfo.usernameToInvite}" to "${inviteInfo.forSessionName}"'''; + } else { + //Another user requested an invite from you. + text = '''${inviteInfo.usernameToInvite} would like to join you in "${inviteInfo.forSessionName}"'''; + } } else { text = '''${inviteInfo.usernameToInvite} would like to join you'''; }