I tried to send MMS for my friend which contains photo of my hamster with text “Now he is sleeping.” It did not work. But now I can not get rid of that photo anymore. Everytime when I start chatty, I can not see it in my chat immediately, but after 10-30 minutes is will be the latest message between me and my friend. My friend does not seem to get the message, but I have plenty of these messages in queue and they are annoying, especially because our hamster died already about a year ago.
I have used 3 hours with following ways to track:
Used ChatGPT and deleted everything in Chatty sqlite3 database relating the strings “Now he is sleeping.”, both messages, files, references everything and relating to MMS’s.
Deleted the files of the purism user, which has this photo, including trash folder.
Compiled new 0.8 prerelease from git.
Newer version only tells me that it failed to send mms, but how in the *#“¤! I can delete that f”!¤%!"¤# queue??? Is that message in some modem queue or where it is hanging?
I can clear the message with this query, but it reappears again after phone is booted (or sometimes when chatty is restarted)
sqlite3 ~/.purple/chatty/db/chatty-history.db “SELECT id, body FROM messages WHERE body LIKE ‘%Now he is sleeping%’;”
Chatgpt wrote a script, which checks all tables, not just message table, but can’t find it from anywhere else.
#!/bin/bash
DB_PATH=“$1”
SEARCH_STRING=“He is sleeping.”
if [[ -z “$DB_PATH” || ! -f “$DB_PATH” ]]; then
echo “Usage: $0 /path/to/database.db”
exit 1
fi
echo “Searching for: "$SEARCH_STRING" in $DB_PATH”
echo
# Get TEXT columns only
COLUMNS=$(sqlite3 "$DB_PATH" "PRAGMA table_info($TABLE);" | awk -F'|' '$3 ~ /TEXT|VARCHAR|CHAR/ {print $2}')
for COLUMN in $COLUMNS; do
QUERY="SELECT rowid, $COLUMN FROM $TABLE WHERE $COLUMN LIKE '%$SEARCH_STRING%';"
MATCHES=$(sqlite3 "$DB_PATH" "$QUERY")
if [[ -n "$MATCHES" ]]; then
echo " >> Matches in table '$TABLE', column '$COLUMN':"
echo "$MATCHES" | sed 's/^/ /'
fi
done
I have used lsof to track it, but I guess I need to track with audit daemon whoever creating the file under ./.local/share/chatty/mms/ again and again…
It must be some strange queue outside of chatty, but where? It always comes with new ID, after restarting chatty.
purism@pureos:~$ ./sleeping.sh /home/purism/.purple/chatty/db/chatty-history.db
Searching for: "He is sleeping." in /home/purism/.purple/chatty/db/chatty-history.db
Checking table: accounts
Checking table: files
Checking table: messages
>> Matches in table 'messages', column 'body':
28169|Now he is sleeping.
Checking table: mm_messages
Checking table: threads
Checking table: file_metadata
Checking table: message_files
Checking table: mime_type
Checking table: thread_members
Checking table: users
purism@pureos:~$ pkill chatty
purism@pureos:~$ ./sleeping.sh /home/purism/.purple/chatty/db/chatty-history.db
Searching for: "He is sleeping." in /home/purism/.purple/chatty/db/chatty-history.db
Checking table: accounts
Checking table: files
Checking table: messages
>> Matches in table 'messages', column 'body':
28169|Now he is sleeping.
Checking table: mm_messages
Checking table: threads
Checking table: file_metadata
Checking table: message_files
Checking table: mime_type
Checking table: thread_members
Checking table: users
purism@pureos:~$ ./delete.sh /home/purism/.purple/chatty/db/chatty-history.db
Deleting from files where url matches...
Deleting from messages where uid matches...
Done.
purism@pureos:~$ ./sleeping.sh /home/purism/.purple/chatty/db/chatty-history.db
Searching for: "He is sleeping." in /home/purism/.purple/chatty/db/chatty-history.db
Checking table: accounts
Checking table: files
Checking table: messages
Checking table: mm_messages
Checking table: threads
Checking table: file_metadata
Checking table: message_files
Checking table: mime_type
Checking table: thread_members
Checking table: users
purism@pureos:~$ chatty &
[1] 2350
purism@pureos:~$ ./sleeping.sh /home/purism/.purple/chatty/db/chatty-history.db
Searching for: "He is sleeping." in /home/purism/.purple/chatty/db/chatty-history.db
Checking table: accounts
Error: database is locked
Checking table: files
Error: database is locked
Checking table: messages
Error: database is locked
Error: database is locked
Error: database is locked
Checking table: mm_messages
Checking table: threads
Checking table: file_metadata
Checking table: message_files
Checking table: mime_type
Checking table: thread_members
Checking table: users
purism@pureos:~$ ./sleeping.sh /home/purism/.purple/chatty/db/chatty-history.db
Searching for: "He is sleeping." in /home/purism/.purple/chatty/db/chatty-history.db
Checking table: accounts
Checking table: files
Checking table: messages
>> Matches in table 'messages', column 'body':
28174|Now he is sleeping.
Checking table: mm_messages
Checking table: threads
Checking table: file_metadata
Checking table: message_files
Checking table: mime_type
Checking table: thread_members
Checking table: users
purism@pureos:~$
sleeping.sh:
#!/bin/bash
DB_PATH="$1"
SEARCH_STRING="He is sleeping."
if [[ -z "$DB_PATH" || ! -f "$DB_PATH" ]]; then
echo "Usage: $0 /path/to/database.db"
exit 1
fi
echo "Searching for: \"$SEARCH_STRING\" in $DB_PATH"
echo
sqlite3 "$DB_PATH" ".tables" | tr -s ' ' '\n' | grep -v '^$' | while read -r TABLE; do
echo "Checking table: $TABLE"
# Get TEXT columns only
COLUMNS=$(sqlite3 "$DB_PATH" "PRAGMA table_info($TABLE);" | awk -F'|' '$3 ~ /TEXT|VARCHAR|CHAR/ {print $2}')
for COLUMN in $COLUMNS; do
QUERY="SELECT rowid, $COLUMN FROM $TABLE WHERE $COLUMN LIKE '%$SEARCH_STRING%';"
MATCHES=$(sqlite3 "$DB_PATH" "$QUERY")
if [[ -n "$MATCHES" ]]; then
echo " >> Matches in table '$TABLE', column '$COLUMN':"
echo "$MATCHES" | sed 's/^/ /'
fi
done
done
delete.sh
#!/bin/bash
DB="$1"
SEARCH_STRING="Now he is sleeping."
if [ -z "$DB" ]; then
echo "Usage: $0 /path/to/database.db"
exit 1
fi
TABLES=$(sqlite3 "$DB" ".tables")
for TABLE in $TABLES; do
COLUMNS=$(sqlite3 "$DB" "PRAGMA table_info($TABLE);" | cut -d'|' -f2)
for COL in $COLUMNS; do
MATCH=$(sqlite3 "$DB" "SELECT COUNT(*) FROM $TABLE WHERE $COL LIKE '%$SEARCH_STRING%';")
if [ "$MATCH" -gt 0 ]; then
echo "Deleting from $TABLE where $COL matches..."
sqlite3 "$DB" "DELETE FROM $TABLE WHERE $COL LIKE '%$SEARCH_STRING%';"
fi
done
done
echo "Done."
From the sounds of it, the message must be trapped in modem manager or something, and chatty is getting the cue to try and send it. Have you tried reaching out to support@puri.sm for assistance? It may take awhile but they would probably have an idea about what to do.
Another thing to try and figure out if it is the modem is use the kill switch to turn off the modem, reboot, and check if chatty still tries to send it.
That ip 185.12.64.5 does not seem to have anything to do with moi and also mms.moi.fi is not resolvable. But it works. I don’t know why and how, but it works. MMS works now ok to both directions and there are no more old mms jumping to end of the thread.