I have done my push notification using laravel. But notifications are overlapping on my mobile. How to show the count and logo.It should not overlap
Hi i got solution for this issue. i have added the 'notid' attribute in my message parameters. here is my code
$message = PushNotification::Message($msg,array('message'=> $msg,
'title'=>$title,'notId' =>rand(10,100),'locKey' => 'localized key','locArgs' => array('localized args','localized args'),
)
);
Related
In laravel app (9.19) with guzzlehttp(7.2 ) and "laravel-notification-channels/telegram (3.0 ) I send image attached to post request like :
$response = Http::attach('document', $fileUrlToUpload, 'document.png')
->post(self::telegramApiUrl.$this->telegramBotToken.'/sendDocument', [
'chat_id' => $this->channelUserId,
'reply_to_message_id' => $replyId
] );
where $fileUrlToUpload - is valid url to image at my local hosting (I work on kubuntu 20.04 with apache2).
My message at appers at Telegram channel, but image in Telegram message is broken and has 41b in size.
I replaced value of $fileUrlToUpload with accessible image url, but anyway image in Telegram message is broken and has 41b in size.
How that can be fixed ?
Thanks!
I am listenig for MessageSentEvent
window.Echo.private("chat" + this.chat.id).listen(
"MessageSentEvent",
e => {
var date = new Date().getTime();
this.lastMessageDate = moment().to(date);
this.lastMessage = e.message;
console.log(e.message.sender.id, this.loggedInUser.id);
// if (e.message.sender.id !== this.loggedInUser.id)
this.chat.messages.push(e.message);
}
);
while I am using the toOthers-method in my controller
broadcast(
new MessageSentEvent(new MessageResource($message), $authUser)
)->toOthers();
leading to duplicates for the one who sent the message
duplicates for the sender
while the receiver just get the expected 1 message
receiver as expected 1 message
if using the outcommented condition, it works fine.... but too me it does not feel clean.
I must have made a mistake somewhere. Why does the toOthers()-method not work and I need to write a condition?
Thx:)
On your axios config try to add your connection socket id.
Try this if You use Echo and if You use pusher or any socket library run the function that return a scketId :
window.axios.defaults.headers.common['X-Socket-Id'] = window.Echo.socketId();
I am facing an issue in Dynamics 365.
Let's say I have 2 queues - Queue1 & Queue2 and have enabled case creation rule on both the queues. Initially, the customer sent an email to Queue1 and converted it into the case, and I want to forward this email to Queue2.
When I forward email FROM Queue1 TO Queue2, it comes back as 'incoming' email to Dynamics through Queue2, but again gets linked to the same old case present in Queue1. I want that, it should create a new case in Queue2.
I tried a pre-create plugin also to clear regardingobject in an incoming email if the sender is a Dynamics queue and as per traces, code is clearing regardingobectid as well. However, it still gets linked to the same ticket somehow.
Is there anyone who faced the same issue and got a workaround.
Plugin code snippet - registered on Email Pre-create sync.
TargetEntity = (Entity)PluginContext.InputParameters["Target"];
var sender = TargetEntity["sender"].ToString().ToLowerInvariant();
EntityCollection senderQueue = GetQueue(sender);
if (senderQueue?.Entities != null && senderQueue.Entities.Count != 0)
{
TracingService.Trace("sender is a queue");
TracingService.Trace("updating : TargetEntity['regardingobjectid'] = null to platform");
TargetEntity["regardingobjectid"] = null;
}```
I was finally able to do it after clearing 3 attributes in the incoming email's target entity.
I have written a pre-validate sync plugin on email cleared below 3 fields :-
TargetEntity["regardingobjectid"] = null;
// this line -- parentactivityid fixed the issue.
TargetEntity["parentactivityid"] = null;
TargetEntity["trackingtoken"] = null;
Hello I am new to Magento (Magento 2.1) My problem is that when any message like sign up successfully or order successfully it is displayed word joining with + sign instead of space. like :
please help.
Provide the code where you concatenate the message. The message should be
$this->messageManager->addError( __('This is your error message.') );
//or
$this->messageManager->addError( __('Invalid %s or %s', 'login', 'password') );
//or replace with variables
I'm using Laravel-4-Nexmo package to send sms but the message is encoded on delivery .
$receiverNumber = "xxxxxxxxxxx"
$message = "hi from nexmo ? ";
$options = array( 'status-report-req' => 1 );
$Nexmo = Nexmo::sendSMS('me', $receiverNumber , $message , $options);
and received message looks like this :
hi+from+nexmo+%3F+
I would like to receive as
hi from nexmo ?
I look forward to see what could be the solution
Probably the mentioned package does not encode the given message so you should use urlencode($yourString) before using the pacckage
I do not know what was wrong with my code above, and I decided to use similar package and it works now. you can find the package here https://github.com/Artistan/nexmo