{"action":"created","issue":{"url":"https://api.github.com/repos/DoctorMcKay/node-steam-tradeoffer-manager/issues/186","repository_url":"https://api.github.com/repos/DoctorMcKay/node-steam-tradeoffer-manager","labels_url":"https://api.github.com/repos/DoctorMcKay/node-steam-tradeoffer-manager/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/DoctorMcKay/node-steam-tradeoffer-manager/issues/186/comments","events_url":"https://api.github.com/repos/DoctorMcKay/node-steam-tradeoffer-manager/issues/186/events","html_url":"https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/issues/186","id":191952575,"number":186,"title":"Detect items already in offers (inOffer property)","user":{"login":"demipixel","id":7506359,"avatar_url":"https://avatars.githubusercontent.com/u/7506359?v=3","gravatar_id":"","url":"https://api.github.com/users/demipixel","html_url":"https://github.com/demipixel","followers_url":"https://api.github.com/users/demipixel/followers","following_url":"https://api.github.com/users/demipixel/following{/other_user}","gists_url":"https://api.github.com/users/demipixel/gists{/gist_id}","starred_url":"https://api.github.com/users/demipixel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demipixel/subscriptions","organizations_url":"https://api.github.com/users/demipixel/orgs","repos_url":"https://api.github.com/users/demipixel/repos","events_url":"https://api.github.com/users/demipixel/events{/privacy}","received_events_url":"https://api.github.com/users/demipixel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-28T09:11:06Z","updated_at":"2016-11-29T00:15:32Z","closed_at":null,"body":"I'd like to know which items are already in offers when loading my inventory. It's possible to do manually (either by loading all offers when attempting to load your inventory or loading once at the beginning and keeping track via events which items are in offers and which are no longer in any offers).\r\n\r\nSo the suggestion is:\r\n\r\n1) Load all offers on startup, save each item from the user in a dictionary\r\n2) Offer changed events detects if an offer was changed (remove items from dictionary whether accepted or declined—not in an offer anymore)\r\n3) When loading the user's inventory, modify the `EconItem` to include an `inOffer` boolean\r\n\r\nYes, it's possible to do yourself by watching `newOffer`, `sentOfferChanged`, and `receivedOfferChanged`, but I would imagine almost any bot (except receive-only bots) want to ensure users get different instances of the same item so trade offers for the same type of item don't clash."},"comment":{"url":"https://api.github.com/repos/DoctorMcKay/node-steam-tradeoffer-manager/issues/comments/263436967","html_url":"https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/issues/186#issuecomment-263436967","issue_url":"https://api.github.com/repos/DoctorMcKay/node-steam-tradeoffer-manager/issues/186","id":263436967,"user":{"login":"andrewda","id":10191084,"avatar_url":"https://avatars.githubusercontent.com/u/10191084?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewda","html_url":"https://github.com/andrewda","followers_url":"https://api.github.com/users/andrewda/followers","following_url":"https://api.github.com/users/andrewda/following{/other_user}","gists_url":"https://api.github.com/users/andrewda/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewda/subscriptions","organizations_url":"https://api.github.com/users/andrewda/orgs","repos_url":"https://api.github.com/users/andrewda/repos","events_url":"https://api.github.com/users/andrewda/events{/privacy}","received_events_url":"https://api.github.com/users/andrewda/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T00:15:32Z","updated_at":"2016-11-29T00:15:32Z","body":"Nope, no in-trade flag AFAIK, though I think 3rd party extensions such as Steam Inventory Helper provide one."}}
{"actor":{"display_login":"andrewda"}}