Skip to content

Commit

Permalink
Check for empty sender_id
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-nadymov committed Dec 22, 2021
1 parent 5933ff6 commit 2f372ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"homepage": "https://evgeny-nadymov.github.io/telegram-react",
"name": "telegram_react",
"version": "0.0.996",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.9.7",
Expand Down
5 changes: 5 additions & 0 deletions src/Utils/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,11 @@ function getMessageSenderName(message, t = k => k) {
return null;
}

if (!sender_id) {
console.log('[sender_id] empty', message);
return null;
}

switch (sender_id['@type']) {
case 'messageSenderUser': {
if (isMeUser(sender_id.user_id)) {
Expand Down

0 comments on commit 2f372ab

Please sign in to comment.