Shyan Wright wanted the 23-year-old to hide the gun because her "yard ain't hot", meaning police were not aware or interested in her home.
Wright, from Walsall, typed "God forbid the children getting closeâ€¦Lol" when the woman said she had stashed it and eight bullets in her room.
Wright, 25, was jailed for five years.
She denied aiding and abetting possession of a firearm but changed her not guilty plea to guilty at Birmingham Crown Court on Monday and was sentenced.
More updates on this story
Wright, from Forrester Street, asked her friend, whose children were aged two and three at the time, in a series of messages on WhatsApp in May 2015.
Using the name ShyShy, she said: "I need a big favourâ€¦me and my baby father was wondering if you could hold onto a [gun emoji] for a bit. Ur only one I can trust.", West Midlands Police said.
Three days later, she asked her where she had hidden it. When the woman confirmed "in Ma room", Wright joked about her children stumbling across it.
Officers raided the friend's home weeks later and recovered the weapon. She was subsequently jailed for five years, West Midlands Police said.
Detectives did not discover who ShyShy was until a wider gun crime investigation last year uncovered intelligence on Wright.
Her home was raided on 2 November when another phone was recovered that was shown to have been used in the WhatsApp conversation.
Det Con Damian Forrest, said both women had "found to their cost the catastrophic consequences of holding on to firearms for someone else".
He added "The messages 'laughing out loud' about what might happen if they '[the children] found the loaded gun are truly shocking and sickening."
A woman persuaded a friend to hide a loaded gun in her home and joked over WhatsApp whether her two young children might find it.