Jump to content


Photo

Get chat history

node.js node-steam-user

  • Please log in to reply
13 replies to this topic

#1 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 73 posts

Posted 24 February 2019 - 01:34 PM

Hi, how can i get full chat history like in as steam chat ? When I using client.getChatHistory() I getting less messages than in steam chat in web browser, and after several times using this method - history would clear.

Can you add the method like in steam web chat for getting full history ? through websocket method or smth


Edited by Ino, 24 February 2019 - 01:34 PM.

  • PonyExpress likes this

#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,127 posts

Posted 25 February 2019 - 04:10 AM

Have you tried getChatMessageHistory?



#3 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 73 posts

Posted 25 February 2019 - 04:40 AM

Have you tried getChatMessageHistory?

No, i haven't tried, but i trying now and getting empty messages, what i doing wrong ? ( i want to get history with my friend by steamid64 )

client.chat.getChatMessageHistory(null, id, {}, (err, response) => {
  console.log(err || response)
})

Edited by Ino, 25 February 2019 - 04:45 AM.


#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,127 posts

Posted 25 February 2019 - 04:49 AM

getChatMessageHistory is only going to get messages for a chat room.



#5 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 73 posts

Posted 25 February 2019 - 04:54 AM

getChatMessageHistory is only going to get messages for a chat room.

Okay, then it doesn't suit me? How i can get full message history with my friend ? Can you add method for this ?


Edited by Ino, 25 February 2019 - 04:58 AM.


#6 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,127 posts

Posted 25 February 2019 - 05:05 AM

I will add the ability in the next release.



#7 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 73 posts

Posted 25 February 2019 - 05:18 AM

I will add the ability in the next release.

Thank you, i'll wait for this



#8 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 73 posts

Posted 27 February 2019 - 03:38 PM

I will add the ability in the next release.

hi, when to expect the next release ?



#9 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,127 posts

Posted 27 February 2019 - 11:04 PM

When I have time.



#10 PonyExpress

PonyExpress

    Member

  • Member
  • PipPip
  • 28 posts

Posted 28 February 2019 - 10:14 AM

Tell me please, it's probably a bad idea - use getFriendMessageHistory very often, for example for spam detection?

About how many times a minute I can use it for sure so that it doesn't cause any problems?



#11 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 73 posts

Posted 28 February 2019 - 12:00 PM

When I have time.

thank you for this update



#12 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,127 posts

Posted 28 February 2019 - 06:47 PM

Tell me please, it's probably a bad idea - use getFriendMessageHistory very often, for example for spam detection?

About how many times a minute I can use it for sure so that it doesn't cause any problems?

 

Why would you need to use it that frequently? You get real-time notifications (through events) when friend messages are received.



#13 PonyExpress

PonyExpress

    Member

  • Member
  • PipPip
  • 28 posts

Posted 01 March 2019 - 07:23 AM

Why would you need to use it that frequently? You get real-time notifications (through events) when friend messages are received.

 

I just did not find a way how to check for identical messages from other bots. That is, my bot responds to any messages (sometimes with a delay), and there are situations like: [other bot say] Unknown command [my bot say] I do not understand [other] Unknown command [my] I do not understand etc.

I do not save any message history (but I save the number of messages in the last 10 seconds) and thought to check: if msg1 = msg2 = ... = msg5 - ignore some time.

 

Although in any case, I understand that this is a bad solution to my problem and it will be better to keep last messages in arr and check them.



#14 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,127 posts

Posted 01 March 2019 - 06:51 PM

it will be better to keep last messages in arr and check them.

 

Most definitely.







Also tagged with one or more of these keywords: node.js, node-steam-user

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users