Hey! I've got a list of all threads and I want to know which is seen and which are not.
Which feeld is responsible for that?
direct_v2/inbox/ shows only last item and last_seen_at timestamp, username and other stuff.
No any field to detect if message had been read.
Any solution?
Not answering your question, but I have a problem with another InstagramAPI that also uses "direct_v2/inbox/" endpoint but returns only the last message sent and unread. Are you able to get all messages using this NODE.JS api?
Nope, I didnt use it. It's general api question.
@diegofcoelho I'm looking for that behavior, what API are you using?
@CashCode @diegofcoelho
I can share my frontend code with you, i hope you can understand it
const itemLastSeen = _.get(this.get('itemsSeenAt'),_.findLastKey(this.get('itemsSeenAt')));
const lastSeenAt = _.isUndefined(itemLastSeen) ? 0 : itemLastSeen.timestamp;
this.set('unread', this.get('lastActivityAt') > lastSeenAt);
@CashCode I'm having a similar problem. How were you able to get a list of all the threads? What does your code look like
Okay, @dilame code worked in earlier version. But now in inbox I see unseen_count field, and unseen_count_ts field. Can I get thread with this new message directly in current version, or I must iterate over all threads and check lastSeen fields?
Most helpful comment
@CashCode @diegofcoelho
I can share my frontend code with you, i hope you can understand it