User unable to receive our messages
Closed this issue · 4 comments
Hey! I have been using papercups with no issue in my web page using vue-papercups. I've had no issue. Recently, I have developed a mobile app using flutter. It seems like there is an issue with it. We are able to receive users' messages, but when we replied through slack/papercups dashboard, users aren't able to receive our messages. I have reached out to the papercups team through chat but haven't gotten further response regarding this.
this is how I integrated it in our mobile app
@override
Widget build(BuildContext context) {
return Scaffold(
floatingActionButton: PaperCupsButton(
onTap: onClickPapercups,
show: _show,
isNavAvailable: widget.isNavigationAvailable,
),
body: Stack(
children: [
widget.body,
PaperCupsChatBox(
onTap: onClickPapercups,
show: _show,
email: _email,
name: _name,
isNavAvailable: widget.isNavigationAvailable,
),
],
),
);
}
Papercups button:
@override
Widget build(BuildContext context) {
return Container(
height: 55,
width: 55,
margin: EdgeInsets.only(bottom: isNavAvailable ? 50 : 0),
decoration: const BoxDecoration(
color: colorPapercups,
shape: BoxShape.circle,
),
child: InkWell(
customBorder: const CircleBorder(),
onTap: onTap,
child: Icon(
show ? Icons.close : Icons.chat_bubble_rounded,
color: colorPapercups.computeLuminance() < 0.5
? Colors.white
: Colors.black,
size: 25,
),
),
);
}
Papercups chatbox:
@override
Widget build(BuildContext context) {
final AppLocalizations _local = AppLocalizations.of(context)!;
MediaQueryData queryData = MediaQuery.of(context);
double _marginBottom = queryData.size.width * 0.18;
if (queryData.size.width > 400) {
_marginBottom = queryData.size.width * 0.24;
}
return Container(
width: double.infinity,
alignment: Alignment.bottomRight,
margin: EdgeInsets.only(bottom: _marginBottom, top: 10),
child: Visibility(
visible: show,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
blurRadius: 10,
color: Theme.of(context).shadowColor.withOpacity(0.2),
),
],
),
constraints: BoxConstraints(
minWidth: 100,
maxWidth: 380,
minHeight: 100,
maxHeight: queryData.size.width * 1.3,
),
margin: const EdgeInsets.all(20),
child: ClipRRect(
borderRadius: BorderRadius.circular(15),
child: PaperCupsWidget(
floatingSendMessage: false,
closeAction: onTap,
props: Props(
accountId: "x",
title: "Welcome to x",
primaryColor: colorPapercups,
greeting: _local.hiThere,
subtitle: _local.askAnything,
requireEmailUpfront: email != null ? false : true,
newMessagePlaceholder: _local.startTyping,
companyName: _local.x,
customer: CustomerMetadata(
email: email,
name: name,
),
),
),
),
),
),
);
}
Hey! This should definitely not be happening. I will take a look at this ASAP
Please try installing 3.0.0-beta.1 and see if it resolves the issue: https://pub.dev/packages/papercups_flutter/versions/3.0.0-beta.1
Thanks a lot! the latest version fixes the issue. :D
Good to know! I might backport to ensure all versions have this fix