AUTOLOCK THREADS!
Dear Steam, this is not hard to figure out how to make this work (or why it's needed, you know, since you LOCK OLD THREADS ANYWAY!)

I had ChatGPT write the code for you, since you don't know how. It's wrong but since you're all "smart PC people" I'm sure you can get one of your interns to actually implement it.

The following is python:

import requests
from datetime import datetime, timedelta

# Hypothetical API endpoints and authentication
FORUM_API_URL = 'https://forum.example.com/api'
API_KEY = 'YOUR_API_KEY'

# Function to get all threads (or posts) from the forum
def get_threads():
response = requests.get(f"{FORUM_API_URL}/threads", headers={"Authorization": f"Bearer {API_KEY}"})
return response.json()

# Function to lock a specific thread
def lock_thread(thread_id):
response = requests.put(f"{FORUM_API_URL}/threads/{thread_id}/lock", headers={"Authorization": f"Bearer {API_KEY}"})
return response.status_code

# Main function
def lock_inactive_threads():
threads = get_threads()
current_time = datetime.utcnow()

for thread in threads:
last_activity = datetime.strptime(thread['last_post_date'], '%Y-%m-%dT%H:%M:%SZ')
time_difference = current_time - last_activity

# Check if the thread has been inactive for more than 60 days
if time_difference > timedelta(days=60):
thread_id = thread['id']
print(f"Locking thread: {thread_id} - last activity {last_activity}")
lock_thread(thread_id)
else:
print(f"Thread {thread['id']} is still active.")

# Run the function to lock inactive threads
lock_inactive_threads()




See how absolutely simple that was? The code is wrong because AI, but it gave you the blueprint you need.
< >
Showing 1-15 of 16 comments
Here, have it in Java too:

public class Thread {
private int id;
private String title;
private long lastPostDate; // Store as number of milliseconds since the epoch
private boolean locked;

public Thread(int id, String title, long lastPostDate) {
this.id = id;
this.title = title;
this.lastPostDate = lastPostDate;
this.locked = false;
}

// Getters and setters for simplicity
public int getId() { return id; }
public void setId(int id) { this.id = id; }
public String getTitle() { return title; }
public void setTitle(String title) { this.title = title; }
public long getLastPostDate() { return lastPostDate; }
public void setLastPostDate(long lastPostDate) { this.lastPostDate = lastPostDate; }
public boolean isLocked() { return locked; }
public void lock() { locked = true; }

@Override
public String toString() {
return "Thread{" +
"id=" + id +
", title='" + title + '\'' +
", lastPostDate=" + new Date(lastPostDate) +
", locked=" + locked +
'}';
}
}
maybe they dont want to implement such a feature since it does nothing
Originally posted by Wolf Knight:
maybe they dont want to implement such a feature since it does nothing
Then they should stop locking threads that are reported to be old.
another option would be to have a warning pop up "This thread has been inactive for X months and etc, etc, etc..... Do you still wish to post in this thread?"

what does it matter if they lock an old thread or not?
Your Python code snippet asks a nonexistent forum for every thread ever made on it and then fires off a request for each one that hasn't been posted to for a while, regardless of whether it's already locked.

Your Java code doesn't do anything at all, but it does shadow java.lang.Thread.
虎🐯 Feb 2 @ 4:58pm 
"it's wrong but" damn you didn't even make it through your own post without rendering it pointless, kudos bud
Originally posted by PlanktonHatesTheWorld:
Originally posted by Wolf Knight:
maybe they dont want to implement such a feature since it does nothing
Then they should stop locking threads that are reported to be old.
Or you could take the the time to understand WHY some old threads get locked and some do. It's not rocket science and as a gamer pattern recognition should be second nature to you.

The simple truth is. Old threads tend to get lock when they are necroed by a post that either says something that has alreadsy been repeated in the thrad, adds no new meaningful information to the thread, or is completely irrelevant to the thread.

Or simply put op. If you don't like getting warned about old thread postings. READ THE THREAD before you post in it.
Originally posted by Start_Running:
Originally posted by PlanktonHatesTheWorld:
Then they should stop locking threads that are reported to be old.
Or you could take the the time to understand WHY some old threads get locked and some do. It's not rocket science and as a gamer pattern recognition should be second nature to you.

The simple truth is. Old threads tend to get lock when they are necroed by a post that either says something that has alreadsy been repeated in the thrad, adds no new meaningful information to the thread, or is completely irrelevant to the thread.

Or simply put op. If you don't like getting warned about old thread postings. READ THE THREAD before you post in it.

I have never not had a necro thread get locked after I reported it, regardless of whatever the necroposter posted.

So you're wrong.

All old threads get locked unless the OP contests the lock with Steam Support.

I report every old thread I ever see and it's always locked. Obviously Steam cares. Just not enough to save me time reporting the ♥♥♥♥♥♥♥ things.

Steam employees are pretty inept it seems, since they are like "we will lock threads if they are old and you report them."

"Oh, okay, but how about just auto-lock old threads?"

"No."

Whatever.
"Necroing" a thread is when someone posts something irrelevant or misleading to a thread that hasn't been posted to for a long time. The reason you've seen every "necroed" thread be actioned is that that's exactly the definition of the subset of topics that should be locked.
Originally posted by Ben Lubar:
"Necroing" a thread is when someone posts something irrelevant or misleading to a thread that hasn't been posted to for a long time. The reason you've seen every "necroed" thread be actioned is that that's exactly the definition of the subset of topics that should be locked.
No. Necroposting is posting on an old thread.

Full stop.
Originally posted by Ben Lubar:
"Necroing" a thread is when someone posts something irrelevant or misleading to a thread that hasn't been posted to for a long time. The reason you've seen every "necroed" thread be actioned is that that's exactly the definition of the subset of topics that should be locked.
Yup. And note that when the post is both relevant, and bringing new information to the thread of substance, the thread is usually allowed to stay.

Take for example if there's a bug, glitch, or other such problem. EVen if a solution was marked. If someone posts a year or two later with a more effective solution, then that will not be consider a necropost.

Originally posted by PlanktonHatesTheWorld:
Originally posted by Ben Lubar:
"Necroing" a thread is when someone posts something irrelevant or misleading to a thread that hasn't been posted to for a long time. The reason you've seen every "necroed" thread be actioned is that that's exactly the definition of the subset of topics that should be locked.
No. Necroposting is posting on an old thread.

Full stop.
Youir personal definition of the term is irrelevant.
Last edited by Start_Running; Feb 2 @ 6:41pm
Tristin Feb 2 @ 8:43pm 
Online browse search clearly shows what necorposting means.

Regardless what it means, 'Discussions Rules and Guidelines' do not state anything about "necroposting". It does however, state about Derailing a discussion or topic and bumping threads.

When mod says that the thread has been closed to "avoid confusion", it exactly means what it says. People expect the discussion thread that is on top to be active, not realizing that it was caused by necroposting. People don't check the date of the OP, and comment on it, after necroposter. Therefore, creating confusion to users, that the post is active, when it actually is not. Also annoys previously subscribed users who were notified for ended discussion. If the necropost doesn't add anything valuable to the discussion, then this becomes reportable for bumping thread, and mods do give warning for it. Mods still may close the thread at their discretion to avoid confusion, even if it the necropost adds something to the discussion if there is enough reports.

This topic has been brought up many times, and I do believe that old inactive threads should just be locked. If someone has something to talk about the old inactive thread, they should just start their own new discussion thread with the reference link towards it.


FYI, the tone and language you (OP poster) use, is how you get banned. Surely not how you have good or agreeable(that you want) discussion. I've seen your posts; much of them are often rude or offensive, to be called proper "basic language skills". Proper delivery is part of the basic skill (or should be), because you could surely lose the original meaning on the way. This thread now feels it is more about you.
Last edited by Tristin; Feb 2 @ 8:55pm
Knee Feb 2 @ 9:14pm 
Literally the first page of this section has a year old thread:
https://steamcommunity.com/discussions/forum/0/5824898961045291652/

First example out of many threads that do not get locked because concurrent replies are still relevant to the original topic. Your "pseudocode" doesn't mean anything without considering what the server code actually is, by the way.
Originally posted by PlanktonHatesTheWorld:
Dear Steam, this is not hard to figure out how to make this work (or why it's needed, you know, since you LOCK OLD THREADS ANYWAY!)

I had ChatGPT write the code for you, since you don't know how. It's wrong but since you're all "smart PC people" I'm sure you can get one of your interns to actually implement it.

The following is python:

import requests
from datetime import datetime, timedelta

# Hypothetical API endpoints and authentication
FORUM_API_URL = {LINK REMOVED}
API_KEY = 'YOUR_API_KEY'

# Function to get all threads (or posts) from the forum
def get_threads():
response = requests.get(f"{FORUM_API_URL}/threads", headers={"Authorization": f"Bearer {API_KEY}"})
return response.json()

# Function to lock a specific thread
def lock_thread(thread_id):
response = requests.put(f"{FORUM_API_URL}/threads/{thread_id}/lock", headers={"Authorization": f"Bearer {API_KEY}"})
return response.status_code

# Main function
def lock_inactive_threads():
threads = get_threads()
current_time = datetime.utcnow()

for thread in threads:
last_activity = datetime.strptime(thread['last_post_date'], '%Y-%m-%dT%H:%M:%SZ')
time_difference = current_time - last_activity

# Check if the thread has been inactive for more than 60 days
if time_difference > timedelta(days=60):
thread_id = thread['id']
print(f"Locking thread: {thread_id} - last activity {last_activity}")
lock_thread(thread_id)
else:
print(f"Thread {thread['id']} is still active.")

# Run the function to lock inactive threads
lock_inactive_threads()




See how absolutely simple that was? The code is wrong because AI, but it gave you the blueprint you need.
Of course incorrect code is simple, that is what we call pseudo code. When you are back from your break, provide some working code.
It's so weird to see old threads get replies with people complaining about how old the thread is, then to come here where someone brings up a solution, but people are defending the practice of reviving old threads.
< >
Showing 1-15 of 16 comments
Per page: 1530 50

Date Posted: Feb 2 @ 4:36pm
Posts: 16