(groupId, userId)
| 16 | } |
| 17 | |
| 18 | function incrementMessageCount(groupId, userId) { |
| 19 | const messageCounts = loadMessageCounts(); |
| 20 | |
| 21 | if (!messageCounts[groupId]) { |
| 22 | messageCounts[groupId] = {}; |
| 23 | } |
| 24 | |
| 25 | if (!messageCounts[groupId][userId]) { |
| 26 | messageCounts[groupId][userId] = 0; |
| 27 | } |
| 28 | |
| 29 | messageCounts[groupId][userId] += 1; |
| 30 | |
| 31 | saveMessageCounts(messageCounts); |
| 32 | } |
| 33 | |
| 34 | function topMembers(sock, chatId, isGroup) { |
| 35 | if (!isGroup) { |
nothing calls this directly
no test coverage detected