I have a login page for my Nitrogen based web app. If user authentication fails I wf:flash a message to the user to let them know. However if the user continues to supply bad credentials these flash message keep building up. Is there a way to first clear the flashed messages before posting a new one?
I was able to remove the original flash message by calling:
wf:update(page__flash, [])
before updating with the new message (via wf:flash(Message)). page__flash is the id of the flash container div, and I just set it's content to be empty.
the notify element here: http://github.com/zaphar/nitrogen-elements/tree/master/src/element_notify/
Is an expanded flash that allows you to have set a timed fade away for the flash message and a few other useful options. It might be what you are looking for.
Related
I am trying to create a teams app that will detect the message that user has typed in before the message is sent on clicking the send button or on the send button click event or before the recipient receives the message. The idea is to read the message and using AI grammatically correct the text or detect if any inappropriate message is being sent that violets office rules, kind of like Grammarly. My question is it possible to detect this text through any possible means like graph api. i am open to any suggestion, not just teams app it can be some kind of windows application that can interact with teams app . Will be taking care of AI part myself.
This isn't supported, there is no No event when user is typing message. You can get an event when user sends the message. For more info here
When a user verifies their email address, I want to receive some notification on my client app (iOS/Android).
I need this to ensure that I can unlock additional capabilities for those users whose address is verified. How can I achieve this?
Currently, the only way to do this is to call the reload method on the User object. However, it is not an ideal way of dealing with this situation – after all, I have no idea when they would click on the link. So, performing a reload every time my app becomes active seems excessive.
Maybe there is a trigger which I missed?
Well, what I do is, each app launch I query the user object for its verification status; if it's not verified I send a verif request right there, if not sent before, and if it is and it's the first time, I show some thank you text and move on. I don't think there's an actual notification you can hook with for when the user clicks the link in the email, but alternatively you could build an admin node function server side to check every now and then for verifications and send pushes to the relevant devices.
I'm using the "incoming webhooks" feature of Slack to post notifications to a channel. I'm also using the "icon_emoji" feature to decorate the messages and to highlight the different types of messages. However I find that the image doesn't show up consistently:
Ie. only when it says BOT does the image also show up.
Any ideas what the issue is? Ideally I would like for the image to show up each message so that they can be scanned easily (some messages are more informative and others need to be acted upon in a timely manner).
Slack is automatically consolidating consecutive messages that are sent within a certain time frame. So the bot icon will show for the first message only and consecutive messages will display beneath the first without the bot icon.
This is standard behavior of Slack and works the same for user messages. Don't believe there is any way to turn that off.
do anybody know about how to read a SMS in iOS with Xamarin iOS ? and then I want to pass a string from that SMS to the application via link. For example when user click the link in the SMS it will pass a string value to the application and in the application a method is waiting to trigger that.
It's impossible to read incoming or storing SMS's due to iOS security restriction.
Although you can't directly intercept SMS messages, you can create a custom URL scheme so that if a user clicks a link in your message it will launch your app.
If Jason's answer of using a link to the app, there is an alternative. In my case a web service is sending down a code (two stage auth). When I know its going to be coming, I prompt the user to looks for it, and when it comes long press the message bubble, and copy the whole message to the pasteboard.
When the user switches back to my app, I've set a flag to look at the pasteboard, I see the message, extract out the code, and if it "works" the user can continue without further interruption.
Not as elegant as Jason's answer, but if you cannot control the sms content, its an option.
It is possible from iOS 12
textField.textContentType = .oneTimeCode
Please check this doc
I'm using ActionMailer in Rails 3 to send periodic emails. I need to know whether an email was sent correctly (as far as it is possible to do so).
#lists.each do |list|
email = Reminder.deadline_reminder(list)
email.deliver
end
Is there a property of the email object (class Mail::message from the Mail library) that will tell me whether the send went correctly (no connection issues, authentication problems, etc)? I've looked through the classes on Github but haven't been able to figure anything out.
It all depends on what you consider successful.
You can test to see whether your code sent the message. You can often check the log to see if the mail-forwarding host received it and moved it on toward its destination.
But, only proprietary mail systems support delivery-receipts. SMTP doesn't and probably never will because of privacy issues and the inability of the mail-client vendors to agree on how to do it. So, even if it is delivered all the way to the intended destination there's no way to know if the person read it.
Your best bet is to put a link in the message that the user clicks which will tickle an app on the server with a token that was unique for that message. When the app sees the token it sets a flag letting you know they got the message AND at least read the part about clicking the link. Then, if there has to be a response within a given time you also track when the message was sent and escalate if the token wasn't received back within the time-limit.