Forum Discussion

peterlu's avatar
peterlu
Champion
10 years ago

API question - check if myself replied to a thread

Hi,   I have been researching this for a long time, and still cannot figure it out. Is there a api to determine is myself(logged in) replied to a thread? Cases: 1. If I create a topic, and there...
  • Tim_h's avatar
    Tim_h
    10 years ago

    peterlu wrote:

    Anyone knows how to make this query in v2?


    Hey peterlu ,  I think you'll get what you need from

    SELECT * FROM messages WHERE author.id='1' AND parent.id = '123' LIMIT 1

    So if you get any data in that they've replied, if not it'll error out.

    Catch the error and do nothing or run the alternate code block.

     

    I've got big plans for what we can do with a thread if you've replied to it or not.  :D